Changed order of move call
This commit is contained in:
parent
ddbc800dbb
commit
89c52d34f4
|
@ -283,6 +283,11 @@ void API_Impl::UpdateWorld()
|
|||
SimpleRigidBody* simpleBody = dynamic_cast<SimpleRigidBody*>(this->customBodies[i]);
|
||||
this->customBodies[i]->SetGravity(-(this->customBodies[i]->GetState().centerPos - this->gravityPoint).GetNormalized()*this->gravity);
|
||||
simpleBody->PreStep(this->dynamicsWorld);
|
||||
|
||||
if(simpleBody->GetRigidBody()->getActivationState() == ACTIVE_TAG)
|
||||
{
|
||||
this->customBodies[i]->CallSubscription_Move();
|
||||
}
|
||||
}
|
||||
|
||||
this->dynamicsWorld->stepSimulation(this->timeStep, 1, this->timeStep);
|
||||
|
@ -296,11 +301,6 @@ void API_Impl::UpdateWorld()
|
|||
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()));
|
||||
|
||||
if(simpleBody->GetRigidBody()->getActivationState() == ACTIVE_TAG)
|
||||
{
|
||||
this->customBodies[i]->CallSubscription_Move();
|
||||
}
|
||||
}
|
||||
|
||||
int numManifolds = this->dynamicsWorld->getDispatcher()->getNumManifolds();
|
||||
|
|
Loading…
Reference in New Issue