mirror of
https://github.com/lubosz/overte.git
synced 2025-04-10 08:57:12 +02:00
motionState needs correct region when adding to physics
This commit is contained in:
parent
addbb597fc
commit
7e44b9b3ae
1 changed files with 3 additions and 0 deletions
|
@ -275,6 +275,9 @@ void PhysicalEntitySimulation::getObjectsToAddToPhysics(VectorOfMotionStates& re
|
|||
_physicalObjects.insert(motionState);
|
||||
result.push_back(motionState);
|
||||
entityItr = _entitiesToAddToPhysics.erase(entityItr);
|
||||
|
||||
// make sure the motionState's region is up-to-date before it is actually added to physics
|
||||
motionState->setRegion(_space->getRegion(entity->getSpaceIndex()));
|
||||
} else {
|
||||
//qWarning() << "Failed to generate new shape for entity." << entity->getName();
|
||||
++entityItr;
|
||||
|
|
Loading…
Reference in a new issue