BGE bug fix: set parent actuator change the orientation of object

This commit is contained in:
Benoit Bolsee 2008-05-02 17:22:28 +00:00
parent f0a41d9d97
commit e7a106625c

@ -229,7 +229,7 @@ void KX_GameObject::SetParent(KX_Scene *scene, KX_GameObject* obj)
NodeSetLocalScale(scale1);
NodeSetLocalPosition(MT_Point3(newpos[0],newpos[1],newpos[2]));
NodeSetLocalOrientation(NodeGetWorldOrientation()*invori);
NodeSetLocalOrientation(invori*NodeGetWorldOrientation());
NodeUpdateGS(0.f,true);
// object will now be a child, it must be removed from the parent list
CListValue* rootlist = scene->GetRootParentList();