If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
bapi
Posts: 33 Joined: Fri Apr 04, 2008 1:57 pm
Location: India
Contact:
Post
by bapi » Tue Dec 23, 2008 12:29 pm
I want to add a camera of third person view to a sphare that is moveable with keys.
How can i do that?
JP
Posts: 4526 Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:
Post
by JP » Tue Dec 23, 2008 1:03 pm
search the forum, it's been discussed many times before
Daggio
Posts: 9 Joined: Mon Oct 20, 2008 7:04 am
Location: Surabaya, Indonesia
Post
by Daggio » Tue Dec 23, 2008 2:34 pm
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
Josh1billion
Posts: 125 Joined: Thu Dec 11, 2008 9:50 pm
Location: Wisconsin
Contact:
Post
by Josh1billion » Tue Dec 23, 2008 9:41 pm
When the player moves, calculate the offset (vector3df offset = newPosition - oldPosition). Then, add that offset to the camera position (camera->setPosition( camera->getPosition() + offset ); ).
bapi
Posts: 33 Joined: Fri Apr 04, 2008 1:57 pm
Location: India
Contact:
Post
by bapi » Wed Dec 24, 2008 5:30 am
Thank for u reply.
I have also done it myself.