I wrote a custom scene node animator for my camera for my strategy game. It can do standard stuff like translate through the WASD keys and zoom in and out. Now I would like to have a possibility to communicate with the camera through the class in which it is created (in this case main). For example I would like to be able to lock movement or set a destination for the camera to travel to. How would I do that?
Or should I drop the animator and instead let the main handle the movements?
Here is how I set up my camera:
Code: Select all
scene::ICameraSceneNode* camera = smgr->addCameraSceneNode(0, core::vector3df(768, 500, 768), core::vector3df(0, 0, 0));
camera->setFarValue(2000);
if (camera)
{
SceneNodeAnimatorCameraCampaign* anim = new SceneNodeAnimatorCameraCampaign();
camera->addAnimator(anim);
anim->drop();
}