Default camera name?

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
ping-pong2012
Posts: 17
Joined: Mon Sep 17, 2012 8:54 pm

Default camera name?

Post by ping-pong2012 »

Working off of Examples 2 and 13, I can't seem to find the default camera name when smgr->addCameraSceneNodeFPS(); is called. This makes it so setActiveCamera fails for anything other than 'fixedcam'
Abraxas)
Posts: 227
Joined: Sun Oct 18, 2009 7:24 am

Re: Default camera name?

Post by Abraxas) »

smgr->addCameraSceneNodeFPS() returns a pointer to an ICameraSceneNode, use that.
ping-pong2012
Posts: 17
Joined: Mon Sep 17, 2012 8:54 pm

Re: Default camera name?

Post by ping-pong2012 »

Ah, that appears to work fine (I used scene::ICameraSceneNode* fpsCamera = smgr->addCameraSceneNodeFPS(); ). A question, is there a penalty or something for using the addcamera function multiple times, like if I wanted something else to have that pointer? I'm guessing the safest idea is just to use the pointer I have instead of calling another one, since I don't know if Irrlicht checks for a pre-existing camera when returning a pointer to the camera made by addCameraSceneNodeFPS().
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Default camera name?

Post by hendu »

That'd create multiple cameras, and then you'd have many pointers to different cams.
ping-pong2012
Posts: 17
Joined: Mon Sep 17, 2012 8:54 pm

Re: Default camera name?

Post by ping-pong2012 »

Thank you
Post Reply