View Full Version : Camera movement?
03-20-2009, 07:58 AM
I'm trying to give the user the ability to move the camera from the keyboard. I want to be able to move forwards backwards, spin 360 degrees and such. The forward and backward I want to have it move where the camera is looking. I'm using glLookAt but not sure what to do.
03-20-2009, 08:25 AM
You shuld look for some tutorials. Try nehe.gamedev.net.
03-20-2009, 10:10 AM
Just update gluLookAt() in every call to display, and store you eye and lookingAt coord's in variables - then just change the variables from the key listener?
03-20-2009, 10:59 AM
yea I know that bit will. But I can't just change the values of one axis. If I change them, the camera slows down as it becomes more parallel with that axis. That I can do already without an issue
03-20-2009, 12:33 PM
What do you mean slows down? And are you incrimenting the co-ordinate you are looking AT aswell as your eye position, if not thats what you want to do.
03-20-2009, 12:35 PM
Oh sorry just re read your question,
It took me most of last weekend to work out how to move where the mosue was, and it still didnt work, so i cant help you with that. ALl i can say is i used lots of trig and circle geometry to calculate the coords of where i wanted to be looking.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.