How to set the init view of a FPS camera?

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.
Post Reply
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

How to set the init view of a FPS camera?

Post by MasterGod »

How do I set where would the camera look and be?

Thanks!
Kim2
Posts: 14
Joined: Thu May 31, 2007 12:40 am

Post by Kim2 »

In your init function

Code: Select all

// add the camera
cam = smgr->addCameraSceneNodeFPS();
cam->setPosition(vector3df(x, y, z));
cam->setTarget(vector3df(x, y, z));
That will set it up. If you want to move the camera around and change its target you do that with the same calls in your render function.
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

gr8! Thanks!
Post Reply