How to make a 3rd person camera

I’d like to know all details about making a 3rd person camera like in Tomb Reader and other 3D platform/racing games.

I’m using euler angles (and going to use quaternions with SLERP when the camera works)

My camera can follow an object with gluLookAt but it doesn’t rotate with the object.
Do I need to do something with the move/direction vector?

please help me!!

HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP


“Since the wedding night, Bill Gates’ wife finally
knows, why he called his company ‘Microsoft’”

This advice is off the top of my head (literally, I found it written there…) so if it is wrong then shoot someone… :wink:

When you rotate the person you need to get the reverse of the viewing vector (which would be rotated by same matrix you used to rotate the person). Then get the centre point of the person and translate that value, using the reverse viewing vector, by the distance of the camera. You now have a point to rotate (slerp) to…

ALTERNATIVELY,

using gluLookAt, set the viewing point to that of the person, then simply rotate the camera by the same amount you rotated the person…

Hope this is usefull…

David

Thnx, that works!


“Since the wedding night, Bill Gates’ wife finally
knows, why he called his company ‘Microsoft’”