Advertisement

Camera Follow

Started by June 27, 2003 06:14 PM
4 comments, last by Trashcann 21 years, 7 months ago
I am trying to implement 3rd person view into my engine- but i am only in 8th grade and don''t know the right math. Can someone give me a formula or something (trig?) to position a camera behind a model? It is the mark of an instructed mind to rest satisfied with the degree of precision which the nature of the subject admits and not to seek exactness when only an approximation of the truth is possible.
ermokwww.truevision3d.com
read about spherical coordinates... too tired to write more right now...
You know what I never noticed before?
Advertisement
You don''t need complex math. Just some basic trig that you can learn in an internet tutorial or library book.

glulookat(-cos(player.angle)*distance, 0.5, -sin(player.angle)*distance, player.x, player.y, player.z, 0, 1, 0);
Not much differnt but slightly better


glulookat(-cos(player.angle)*distance + player.x, rideheight + player.y, -sin(player.angle)*distance + player.z, player.x, player.y, player.z, 0, 1, 0)
Oh, yeah, I forgot to factor in the player position. Minor technicality
How to implement a simple third person camera:
http://www.gamedev.net/reference/articles/article1591.asp

some searches should probably bring up more results.
~Wave

This topic is closed to new replies.

Advertisement