Fixed set position

This commit is contained in:
Robin Engman 2014-02-12 14:10:17 +01:00
parent b95e1d6b7a
commit 5e1bc2264c
1 changed files with 1 additions and 1 deletions

View File

@ -201,7 +201,7 @@ void API_Impl::UpdateWorld()
{
SimpleRigidBody* simpleBody = dynamic_cast<SimpleRigidBody*>(this->customBodies[i]);
btTransform trans;
simpleBody->GetMotionState()->getWorldTransform(trans);
trans = simpleBody->GetRigidBody()->getWorldTransform();
this->customBodies[i]->SetPosition(Float3(trans.getOrigin().x(), trans.getOrigin().y(), trans.getOrigin().z()));
this->customBodies[i]->SetRotation(Quaternion(Float3(trans.getRotation().x(), trans.getRotation().y(), trans.getRotation().z()), trans.getRotation().w()));