OpenGL Tomb Raider Style Rotation

Started by
4 comments, last by Pointed 23 years, 10 months ago
Hi, Im making a first person Soccer game using OGL.. The game is at a stage where I can run around the field, however presently it is in QUAKE (tunnel vision) mode. I would like to have the player visible just in front of the screen, just like in Tomb Raider. Hence I need to have the world rotate around a ''y'' axis which needs to be just in from of the camera. How can I move the y-axis forward?? or should I just move the camera view back along the z axis?? Thanks for your time, Pointed
Advertisement
In my flight sim I use a -Z value (and a small +Y up value) to place the pov behind the airplane. The resultant coordinates are then translated and rotated. This retains the coordinates of the main object, airplane or player, to interact with other objects.

Good luck with the soccer game - it sounds ambitious!

glTranslatef(0.0f,distance_from_player,0.0f); //to translate infront of the player
glRotate3f(angle_measure,0.0f,1.0f,0.0f);//to rotate around the y axis.
Is that what you were looking for?

JoeMont001@aol.com
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
Hi Pointed,

I would say you''re better trying looking for a doc on Rotation using quadradic". This is the type of rotation used in Tomb Raider or in any good "Third person view"


lowrad
Thanks guys,

I really appreciate your help

See ya later,
Pointed
I think what lowrad is actually trying to say is to use "quaternions" for your rotations. You will not be able to get smooth interpolations of your camera rotations without them.
(unless you fix the x-axis rotation to a static angle).

This topic is closed to new replies.

Advertisement