View Full Version : 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.
05-02-2002, 10:44 AM
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 the `view' 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.
05-02-2002, 11:21 AM
Use the force Luke!!!
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.