How to move the camera?
Hi!
I have done gamelesson 4 (loading MD2 and MS3D files) and now i wonder how to move the camera in a easy way? I want to place the camera behind the object on the screen no matter how it is rotated and i fugured i could do this by simply not using glLoadIdentity between the placement of the object and the camera (and using glTranslatef to go back some units on the objects x-axis).
----------------------------
When hell freezes over it will be a pretty cool place to snowboard
When hell freezes over it will be a pretty cool place to snowboard
I don''t know...i am using glLookAt as a camera...i am not sure if this is the right thing to do, but it works in my projects.....
Hell World Game/3d EngineFind it at http://www.angelfire.com/on3/ironhell3index/HellWorld.html
If you want to do things without using GLU, you can always do...
Of course, thats just one simple way of doing it. both the GL_PROJECTION method I showed you, as well as the gluLookAt method presented by ironhell3 are fairly quick fixes. There are other ways of moving the camera in OpenGL as well.
|
Of course, thats just one simple way of doing it. both the GL_PROJECTION method I showed you, as well as the gluLookAt method presented by ironhell3 are fairly quick fixes. There are other ways of moving the camera in OpenGL as well.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement