mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
Merge pull request #8113 from AndrewMeadows/fix-kinematic-motion
fix setting velocity of inactive kinematic RigidBody
This commit is contained in:
commit
d9e8026cd6
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