Game worlds are viewed from a camera, which is the viewpoint from which the game world is observed from.
1
vote
1answer
43 views
How to automatically render all opaque meshes with a specific shader?
I have a specular outline shader that I want to be used on all opaque meshes of the scene whenever a specific camera renders. The shader is working properly when it is manually applied to some ...
1
vote
2answers
377 views
Camera frustum calculation coming out wrong
I'm trying to calculate a view/projection/bounding frustum for the 6 directions of a point light and I'm having trouble with the views pointing along the Y axis. Our game uses a right-handed, Y-up ...
0
votes
1answer
132 views
Rotate around the centre of the screen
I want my camera to rotate around the centre of screen and I'm not sure how to achieve that. I have a rotation in the camera but I'm not sure what its rotating around. (I think it might be rotating ...
2
votes
1answer
81 views
First Person Camera strafing at angle
I have a simple camera class working in directx 11 allowing moving forward and rotating left and right. I'm trying to implement strafing into it but having some problems.
The strafing works when ...
1
vote
1answer
36 views
Drawing chunks, and positioning the camera
I've seen many questions and answers regarding how to draw tiled maps but I can't really get my head around it. Many answers suggest either loading the visible part of the map, or loading and ...
1
vote
1answer
82 views
Automatically zoom out the camera to show all players
I am building a game in XNA that takes place in a rectangular arena. The game is multiplayer and each player may go where they like within the arena. The camera is a perspective camera that looks ...
0
votes
1answer
42 views
Obtain rectangle indicating 2D world space camera can see
I have a 2D tile based game in XNA, with a moveable camera that can scroll around and zoom.
I'm trying to obtain a rectangle which indicates the area, in world space, that my camera is looking at, so ...
0
votes
1answer
77 views
OpenGL camera translate and rotate on cameras local axis
How can I make rotation and translation on a local camera axis in OpenGL?
I want to make camera like "aeroplane" camera with a pitch yaw and roll.
I want to have good explanation on everything!
Can ...
0
votes
1answer
37 views
How to code camera for layered map in unity
For a current unity project I need a layered map like in Dwarf Fortress. The game will take place in a 3D city enviroment and the camera should be 'snapped' to layers. So there will be (for example) a ...
1
vote
1answer
152 views
Camera lookAt target changes when rotating parent node
have the following issue.I have a camera with lookAt method which works fine.I have a parent node to which I parent the camera.If I rotate the parent node while keeping the camera lookAt the target , ...
2
votes
4answers
109 views
How do I rotate a camera around the Y axis of the object it's looking at? [duplicate]
I'm making a camera that can currently rotate freely from the back to the front of a target object by giving it an angle and a distance.
I do the above with the following code
directionVector = ...
1
vote
3answers
71 views
Can I use a translate function to implement a viewport?
I read this great question and its accompanying great answer about rendering a viewport in a top down 2D game:
As for actually drawing the objects the camera can "see", you now draw all objects ...
0
votes
2answers
215 views
First person camera: problem
I have created a simple camera class, moved it from my C# (XNA) source to C++ for d3d.
Commonly it is okay, but something is wrong with rotation.
If i increase its pitch/yaw values, according to ...
0
votes
1answer
191 views
Simulate camera movement in two dimensions (OpenGL)
I've been told by the folks over at Stack Overflow that there's no way to move the camera in OpenGL. I'm developing a 2D RPG with LWJGL and need to know the proper way to simulate camera movement as ...
0
votes
1answer
101 views
Drag camera/view in a 3D world
I'm trying to make a Draggable view in a 3D world.
Currently, I've made it using mouse position on the screen, but, when I move the distance traveled by my mouse is not equal to the distance traveled ...