CameraSceneNodeMaya can't be repositioned

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
comicsteam
Posts: 51
Joined: Thu Sep 11, 2008 2:24 pm
Location: Hong Kong
Contact:

CameraSceneNodeMaya can't be repositioned

Post by comicsteam »

this question has been asked by sunzhuo before. we cannot initialize MAYA camera position.....
is it possible to add one more parameter in addCameraSceneNodeMaya()
or provide serializeAttributes() function,
so that we can change the camera position??
DtD
Posts: 264
Joined: Mon Aug 11, 2008 7:05 am
Location: Kansas
Contact:

Post by DtD »

This is by design. The built-in FPS and Maya cameras are intended mostly for prototyping. If you need to expand beyong the default code, your best bet is to start blank with a ICameraSceneNode. You can proably scrape some code out of Irrlicht's source to help get started with something similar to the maya camera.

~DtD
geckoman
Posts: 143
Joined: Thu Nov 27, 2008 11:05 am
Location: Germany
Contact:

Post by geckoman »

Writing your own cam is probably the best thing, as you can add and change functions as you like. I did this for my time-based RTS-Camera. The only thing you could be faced is some math, but that should be no problem.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

If the built-in camera does what you need, you shouldn't have to write your own. I'm not certain that I understand the problem that you're having. Are you complaining that you can't do something like this?

Code: Select all

const core::vector3df pos (100.f, 10.f, 1000.f);
scene::ICameraSceneNode* cam = smgr->addCameraSceneNodeMaya(..., pos);
If so, why not just write this code instead?

Code: Select all

scene::ICameraSceneNode* cam = smgr->addCameraSceneNodeMaya(...);

const core::vector3df pos (100.f, 10.f, 1000.f);
cam->setPosition(pos);

// call this if you need the camera position to be up to date before the first render
cam->updateAbsolutePosition();
Travis
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Also, I see no reason that you can't use serializeAttributes() on a camera. It seems to work just fine here.

Travis
Post Reply