Camera Question

I have a top view game. What camera view do I use so that when my player moves, the camera wil follow it?? Thanks.


A rather ambiguous question. OpenGL doesn’t have cameras' - they are the product of the way you setup the modelview matrix. If you want to move theview’ with the player, you should translate the entire scene to the players co-ordinates. This should be the first transform on the stack at the start of each frame. With a purely top-down view, you can achieve this with glTranslatef (-playerX, -HEIGHT_ABOVE_PLAYER, -playerZ. ).

Hope this helps.

Use the force Luke!!!