BGE BugFix: [#24052] Can't change dynamic object's orientation using python (fix by Benoit)

from the tracker:
"""The required functionality is provided by the localOrientation property: setting this value will change the dynamic object orientation. This is because dynamic object have no parent and thus the local and world orientation are identical. However, setting worldOrientation will only change the scenegraph node, which has no effect as the physics controller will reset the orientation on next physics synchronization."""
This commit is contained in:
Dalai Felinto 2010-12-08 06:59:13 +00:00
parent 2692dc5561
commit 70df57df0f

@ -1022,7 +1022,7 @@ void KX_GameObject::NodeSetGlobalOrientation(const MT_Matrix3x3& rot)
if (GetSGNode()->GetSGParent())
GetSGNode()->SetLocalOrientation(GetSGNode()->GetSGParent()->GetWorldOrientation().inverse()*rot);
else
GetSGNode()->SetLocalOrientation(rot);
NodeSetLocalOrientation(rot);
}
void KX_GameObject::NodeSetLocalScale(const MT_Vector3& scale)