Page 1 of 1

Create a third person view camera and fallow a sphere

Posted: Tue Dec 23, 2008 12:29 pm
by bapi
I want to add a camera of third person view to a sphare that is moveable with keys.

How can i do that?

Posted: Tue Dec 23, 2008 1:03 pm
by JP
search the forum, it's been discussed many times before :)

Posted: Tue Dec 23, 2008 2:34 pm
by Daggio
simple. just add a camera (not the FPS camera) to your sphere and then process user input to move the sphere

just as JP said it has been explained many times before, also it's also good if you do the tutorials :D

Posted: Tue Dec 23, 2008 9:41 pm
by Josh1billion
When the player moves, calculate the offset (vector3df offset = newPosition - oldPosition). Then, add that offset to the camera position (camera->setPosition( camera->getPosition() + offset ); ).

Posted: Wed Dec 24, 2008 5:30 am
by bapi
Thank for u reply.

I have also done it myself.