Fixed set position
This commit is contained in:
parent
b95e1d6b7a
commit
5e1bc2264c
|
@ -201,7 +201,7 @@ void API_Impl::UpdateWorld()
|
||||||
{
|
{
|
||||||
SimpleRigidBody* simpleBody = dynamic_cast<SimpleRigidBody*>(this->customBodies[i]);
|
SimpleRigidBody* simpleBody = dynamic_cast<SimpleRigidBody*>(this->customBodies[i]);
|
||||||
btTransform trans;
|
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]->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()));
|
this->customBodies[i]->SetRotation(Quaternion(Float3(trans.getRotation().x(), trans.getRotation().y(), trans.getRotation().z()), trans.getRotation().w()));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue