fix BGE patch #7892: dRot motion is reversed on non-dynamic objects

Positive dRot motion actuator will now make the dynamic and non-dynamic objects rotate counter-clock wise.
This commit is contained in:
Benoit Bolsee
2008-04-11 21:19:00 +00:00
parent 8f6a16c12e
commit 4bab327c1b

View File

@@ -314,12 +314,13 @@ void KX_GameObject::ApplyMovement(const MT_Vector3& dloc,bool local)
void KX_GameObject::ApplyRotation(const MT_Vector3& drot,bool local)
{
MT_Matrix3x3 rotmat(drot);
rotmat.transpose();
if (m_pPhysicsController1) // (IsDynamic())
m_pPhysicsController1->RelativeRotate(rotmat,local);
// in worldspace
GetSGNode()->RelativeRotate(rotmat,local);
if (m_pPhysicsController1) { // (IsDynamic())
rotmat.transpose();
m_pPhysicsController1->RelativeRotate(rotmat,local);
}
}