I've added to my editor an FPS camera which I can switch on and off whether the right mouse button is being used. But in the editor I need to change the movement speed of the camera depending on the size of the scene.
How do I do one of these?
1. Grab the animator from the camera and change the speed?
2. Manually add an FPS animator to a camera?
Camera FPS animator changing values?
Re: Camera FPS animator changing values?
After another thorough search I managed to figure it out by grabbing the list of animators and casting.
Code: Select all
core::list<scene::ISceneNodeAnimator*>::ConstIterator anims
=camera->getAnimators().begin();
scene::ISceneNodeAnimatorCameraFPS *anim
=(scene::ISceneNodeAnimatorCameraFPS*)*anims;
anim->setMoveSpeed(moveSpeed);
anim->setRotateSpeed(rotateSpeed);