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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user