mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 19:55:07 +02:00
force activate kinmatic objects when necessary
This commit is contained in:
parent
10d79945d1
commit
31706a3909
1 changed files with 8 additions and 1 deletions
|
@ -135,7 +135,14 @@ void EntityMotionState::handleEasyChanges(uint32_t& flags) {
|
|||
_nextOwnershipBid = 0;
|
||||
}
|
||||
if ((flags & Simulation::DIRTY_PHYSICS_ACTIVATION) && !_body->isActive()) {
|
||||
_body->activate();
|
||||
if (_body->isKinematicObject()) {
|
||||
// only force activate kinematic bodies (dynamic shouldn't need force and
|
||||
// active static bodies are special (see PhysicsEngine::_activeStaticBodies))
|
||||
_body->activate(true);
|
||||
_lastKinematicStep = ObjectMotionState::getWorldSimulationStep();
|
||||
} else {
|
||||
_body->activate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue