mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 04:57:58 +02:00
correctg measured acceleration for kinematics
This commit is contained in:
parent
a3c66d8c91
commit
8efb07cfd8
1 changed files with 4 additions and 0 deletions
|
@ -877,6 +877,10 @@ void EntityItem::simulate(const quint64& now) {
|
||||||
// this entity is no longer moving
|
// this entity is no longer moving
|
||||||
// flag it to transition from KINEMATIC to STATIC
|
// flag it to transition from KINEMATIC to STATIC
|
||||||
_dirtyFlags |= Simulation::DIRTY_MOTION_TYPE;
|
_dirtyFlags |= Simulation::DIRTY_MOTION_TYPE;
|
||||||
|
setAcceleration(Vectors::ZERO);
|
||||||
|
} else {
|
||||||
|
// this object is moving kinematically, so make sure its "measured acceleration" is "gravity"
|
||||||
|
setAcceleration(_gravity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_lastSimulated = now;
|
_lastSimulated = now;
|
||||||
|
|
Loading…
Reference in a new issue