View Full Version : Translate world or camera

03-05-2002, 07:55 AM
I've searched the archives but I'm still unsure about this one. What is the preferred method of moving a character in a FPS type game? I currently translate the world in the opposite direction of the player. However, I see more and more people using gluLookAt or some variation and translating the camera, expecially in 3rd person apps. One problem I have found with the method I use is that for frustum culling I have to manually translate vertices of bounding boxes in order to test them against the view frustum. What I mean is that the vertices are only transformed in the modelview matrix. So if I want to follow a vertex in my code I have to translate the vertex seperate from the modelview matrix.

I hope this makes sense.



03-05-2002, 08:05 AM
Translating camera or world is exactly the same thing. That's why it's called modelview matrix.

To speed up your frustum culling, try transforming your frustum parameters instead of world geometry. Should be quite a bit faster http://www.opengl.org/discussion_boards/ubb/wink.gif

03-05-2002, 09:25 AM
Thanks for the tip!