Commit d12a0027 authored by cutealien's avatar cutealien

Let maya-cam animator react on a setTarget call to the camera which happened...

Let maya-cam animator react on a setTarget call to the camera which happened outside it's own control


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2770 dfc29bdd-3216-0410-991c-e03cc46cb475
parent f2145fd2
......@@ -110,6 +110,11 @@ void CSceneNodeAnimatorCameraMaya::animateNode(ISceneNode *node, u32 timeMs)
{
OldTarget = camera->getTarget();
OldCamera = camera;
LastCameraTarget = OldTarget;
}
else
{
OldTarget += camera->getTarget() - LastCameraTarget;
}
core::vector3df target = camera->getTarget();
......@@ -227,6 +232,7 @@ void CSceneNodeAnimatorCameraMaya::animateNode(ISceneNode *node, u32 timeMs)
camera->setPosition(Pos);
camera->setTarget(target);
camera->setUpVector(upVector);
LastCameraTarget = camera->getTarget();
}
......
......@@ -99,6 +99,7 @@ namespace scene
f32 CurrentZoom;
f32 RotX, RotY;
core::vector3df OldTarget;
core::vector3df LastCameraTarget; // to find out if the camera target was moved outside this animator
scene::ICameraSceneNode* OldCamera;
core::position2df MousePos;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment