Thank you for the helpful replies. I managed to access the camera with the following code:
Code: Select all
camera = static_cast<ICameraSceneNode*>(smgr->getSceneNodeFromId(397221078));
device->getCursorControl()->setVisible(false);
cameraFPS = smgr->addCameraSceneNodeFPS(0,100.0f,0.5,-1,keyMap,9,true,0.1f,false,true);
cameraFPS->setPosition(camera->getPosition());
cameraFPS->setRotation(camera->getRotation());
cameraFPS->setTarget(camera->getTarget());
cameraFPS->setAspectRatio(camera->getAspectRatio());
cameraFPS->setFarValue(camera->getFarValue());
cameraFPS->setFOV(camera->getFOV());
I'm not sure if there is a more direct way to use the camera from the .irr scene, but this seems to function correctly. I am posting this code so you can tell me if I am doing something redundant or not.
Now, in the .irr scene I made, I added a dynamic light that flies in a circle, but when I run the application I made, it doesn't show the effect of the light moving from wall to wall like it does when I run it in irrEdit. It only shows static light on the walls. How do I render the light animation and other animations from my .irr scene in my code? I would of assumed that by loading the .irr scene it would automatically render the light animations etc, but from what I have discerned I have to make a call manually?
Additionally, when I run my code it shows the FPS as 1, as if everything is static. I don't understand why it is rendering the meshes and the initial frame of the light node but not any of the animations that go with it.
Any help is appreciated.