Archived

This topic is now archived and is closed to further replies.

The best methode for a camera?

This topic is 5653 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''d use whatever method is most natural for you. They can all do whatever you like, its just a question of how familier you are with each as a technique. I have heard rumors that gluLookAt is slow, but since you position a camera once per frame its not terribly likely to become a bottleneck.

Share this post


Link to post
Share on other sites
i use a camera with two member variables, a quaternion for orientation and a vector for positioning.

then all you have to do is translate for the position and then get your view matrix and multiply the top of the stack by it and hey presto!

simple and efficient, plus there''s not gimble lock...

-jonnii

Share this post


Link to post
Share on other sites
GluLookat: Use only if you have complex camera motions. If you only have simple motions (translating and rotating around less than all 6 degrees of freedom) use manual rotate/translate (my personal favourite).

Quaternation: Pretty good if you understand them. These are a must if your camera is going to rotate around all 360 degrees (flightsim: flying upside down and stuff).

Hope that helps

Sander Maréchal
[Lone Wolves Production][Articles][E-mail]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Rotate/translate my fave. Unless you are writing a flight sim. For most games, the camera is quite simple and direct (the eyes on a person''s head, the view out of a vehicle''s windows) or procedural (a camera behind a car, which maybe doesn''t turn quite as fast as the car, so there is a small lag). Don''t need quaternions, so don''t use them.

Share this post


Link to post
Share on other sites
quats'' only have their place in animation, imo. pretty much anything you do with camera work can be done with standard matricies, and a few tricks. you don''t need quats''.

Share this post


Link to post
Share on other sites