Fix Maya and Modified Maya rotation
MODIFY
source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp
source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp
@@ -202,14 +202,14 @@ void CSceneNodeAnimatorCameraMaya::animateNode(IDummyTransformationSceneNode *no
}
else
{
- nRotX += (RotateStart.X - MousePos.X) * RotateSpeed;
- nRotY += (RotateStart.Y - MousePos.Y) * RotateSpeed;
+ nRotX += (MousePos.X - RotateStart.X) * RotateSpeed;
+ nRotY += (MousePos.Y - RotateStart.Y) * RotateSpeed;
}
}
else if (Rotating)
{
- RotX += (RotateStart.X - MousePos.X) * RotateSpeed;
- RotY += (RotateStart.Y - MousePos.Y) * RotateSpeed;
+ RotX += (MousePos.X - RotateStart.X) * RotateSpeed;
+ RotY += (MousePos.Y - RotateStart.Y) * RotateSpeed;
nRotX = RotX;
nRotY = RotY;
Rotating = false;

MODIFY
source/Irrlicht/CSceneNodeAnimatorCameraModifiedMaya.cpp
source/Irrlicht/CSceneNodeAnimatorCameraModifiedMaya.cpp
@@ -251,16 +251,16 @@ namespace irr
}
else
{
- nRotX += (RotateStart.X - MousePos.X) * RotateSpeed;
- nRotY += (RotateStart.Y - MousePos.Y) * RotateSpeed;
+ nRotX += (MousePos.X - RotateStart.X) * RotateSpeed;
+ nRotY += (MousePos.Y - RotateStart.Y) * RotateSpeed;
}
}
else
{
if (Rotating)
{
- RotX += (RotateStart.X - MousePos.X) * RotateSpeed;
- RotY += (RotateStart.Y - MousePos.Y) * RotateSpeed;
+ RotX += (MousePos.X - RotateStart.X) * RotateSpeed;
+ RotY += (MousePos.Y - RotateStart.Y) * RotateSpeed;
nRotX = RotX;
nRotY = RotY;

Fix Maya and Modified Maya rotation