mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
don't honor gravity in simple extrapolation on entities equipped by others
This commit is contained in:
parent
f4e57898c6
commit
6b44f62982
1 changed files with 5 additions and 1 deletions
|
@ -203,7 +203,11 @@ void EntityMotionState::getWorldTransform(btTransform& worldTrans) const {
|
||||||
BT_PROFILE("kinematicIntegration");
|
BT_PROFILE("kinematicIntegration");
|
||||||
// This is physical kinematic motion which steps strictly by the subframe count
|
// This is physical kinematic motion which steps strictly by the subframe count
|
||||||
// of the physics simulation and uses full gravity for acceleration.
|
// 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();
|
uint32_t thisStep = ObjectMotionState::getWorldSimulationStep();
|
||||||
float dt = (thisStep - _lastKinematicStep) * PHYSICS_ENGINE_FIXED_SUBSTEP;
|
float dt = (thisStep - _lastKinematicStep) * PHYSICS_ENGINE_FIXED_SUBSTEP;
|
||||||
_entity->stepKinematicMotion(dt);
|
_entity->stepKinematicMotion(dt);
|
||||||
|
|
Loading…
Reference in a new issue