mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 11:28:03 +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,8 +135,15 @@ void EntityMotionState::handleEasyChanges(uint32_t& flags) {
|
||||||
_nextOwnershipBid = 0;
|
_nextOwnershipBid = 0;
|
||||||
}
|
}
|
||||||
if ((flags & Simulation::DIRTY_PHYSICS_ACTIVATION) && !_body->isActive()) {
|
if ((flags & Simulation::DIRTY_PHYSICS_ACTIVATION) && !_body->isActive()) {
|
||||||
|
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();
|
_body->activate();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue