I'm making a game in C++ using Direct3D 9. How do I move the camera at constant rate?
I'm making a Flappy Bird type game and I'd like to move the camera forward through the level.
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.
Sign up to join this communityIf you have a camera eye position, move that in the forward direction (add to its xyz values the constant vector xyz values which you want to move it by). The camera up vector (which defines the up direction) should stay intact (unless you want to rotate the camera), the lookat vector (or forward vector in which your camera faces from the eye position) should be lookAt.xyz=lookAt.xyz+eye.xyz . Then recreate your view matrix with those values. The projection should not be changed.