mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 07:12:40 +02:00
Merge pull request #9596 from sethalves/fix-equip-from-other-pov
fix -- don't honor gravity in simple extrapolation on entities equipped by others
This commit is contained in:
commit
998fbfb909
1 changed files with 5 additions and 1 deletions
|
@ -203,7 +203,11 @@ void EntityMotionState::getWorldTransform(btTransform& worldTrans) const {
|
|||
BT_PROFILE("kinematicIntegration");
|
||||
// This is physical kinematic motion which steps strictly by the subframe count
|
||||
// of the physics simulation and uses full gravity for acceleration.
|
||||
_entity->setAcceleration(_entity->getGravity());
|
||||
if (_entity->hasAncestorOfType(NestableType::Avatar)) {
|
||||
_entity->setAcceleration(glm::vec3(0.0f));
|
||||
} else {
|
||||
_entity->setAcceleration(_entity->getGravity());
|
||||
}
|
||||
uint32_t thisStep = ObjectMotionState::getWorldSimulationStep();
|
||||
float dt = (thisStep - _lastKinematicStep) * PHYSICS_ENGINE_FIXED_SUBSTEP;
|
||||
_entity->stepKinematicMotion(dt);
|
||||
|
|
Loading…
Reference in a new issue