View Full Version : movingWorld
07-14-2001, 07:20 PM
Whenever I try to make the camera move and the world stay still, the camea is stationary and the world moves around. How do I prevent that?
Well, what is the difference? http://www.opengl.org/discussion_boards/ubb/smile.gif
07-14-2001, 10:46 PM
Are you sure that is what happens? The effect of moving the camera is that the scene as a whole is moved. The Tech FAQ has a good suggestion on how to deal with camera movement. See sec. 8.060
07-15-2001, 01:03 AM
Reverse the direction around, to move through the world you have to move the world the oposite way.
If you press forewards in your program then the world move forewards, therefore you appear to move backwards. Translate the negative of this and all should be well.
glRotatef(Camera.bob, 0.0,0.0,1.0); // not needed
Here is a snippet of my code, you see I hold the position in Camera but for renderinmg purposes these have to be negative to move the world.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.