I wrote a new camera class, which supports zooming with the scroll wheel.
Since I didn't want to touch the original irrlicht source, I just manually did the same call the scenemanager.addCameraSceneNodeMaya(...)
The scenemanager code is -
Code: Select all
if(!parent)
parent = this;
ICameraSceneNode* node = new CCameraMayaSceneNode(parent, this, id, rotate...);
node->drop();
setActiveCamera(node);
return node;
Code: Select all
smgr = Device->getSceneManager();
ICameraSceneNode* node = new CCameraSimpleNode((ISceneNode*)smgr, smgr, id);
node->drop();
setActiveCamera(node);
The other one is if I print the parent pointer of the MayaCamera, it doesn't match the pointer to the scene manager. If you put a printf in the CSceneManager class and print the parent, its not NULL and its not the this pointer either. Since the method addCameraSceneNodeMaya defaults the parent pointer to 0, where is this other value coming from?
The only way I can get my camera to work is do this -
Code: Select all
ISceneNode* node = smgr->addCameraSceneNodeMaya();
node = new CCameraSimpleNode(node->getParent(), smgr, id);
node->drop();
setActiveCamera(node);
Cheers,
Dr. A>