3rd Person ArcBall camera

Started by
1 comment, last by FlyingDemon 20 years, 3 months ago
How would I go by making a 3rd person camera were the mouse controls the angles or orientation. Like an ArcBall were the camera moves along a sphere and is always focused on the object in the center. Something like the way that Americas Army's 3rd person camera works. And.. Would I be better off creating vectors to put into gluLookAt. Or creating a matrix and using glMultMatrix? So far.. I've tried using euler angles to control the movment of the camera ( heading and pitch )but I seems that the camera is always moving on a verticle cylinder, never being directly above the object. I've also tried using quaternions to rotate the camera. The rotation about the 'Y'-Axis works fine until I change the pitch of the camera. Then everything messes up, as in the quaternions work as they're supposed to (because they are ment to rotate objects like an airplane). For those of you who dont understand what im talking about, Im trying to achieve this effect (except were the movement is controlled with the mouse) [link] http://homepages.borland.com/efg2lab/Graphics/ThreeDLab.htm [/link] [edited by - FlyingDemon on January 22, 2004 12:26:48 AM]
Advertisement
porfavar senores - bump ☼
You might want to look into axis-angle rotations. Ben Humphrey from www.gametutorials.com has a tutorial covering this topic (tutorial #6). You can also check out this link, which Ben Humphrey includes as a reference to his tutorial: http://astronomy.swin.edu.au/~pbourke/geometry/rotate/

Hope that helps out.

-noix-

In this world gone mad, we won't spank the monkey; the monkey will spank us.

[edited by - noixtirdoe on January 24, 2004 5:59:59 PM]
In this world gone mad, we won't spank the monkey; the monkey will spank us.

This topic is closed to new replies.

Advertisement