#### Archived

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

# 3rd Person ArcBall camera

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

## Recommended Posts

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]

##### Share on other sites
porfavar senores - bump ☼

##### Share on other sites
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]

1. 1
Rutin
37
2. 2
3. 3
4. 4
5. 5

• 11
• 15
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633352
• Total Posts
3011483
• ### Who's Online (See full list)

There are no registered users currently online

×