mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 15:14:19 +02:00
debugging stutter
This commit is contained in:
parent
c6ad1462e6
commit
6a9a6968f2
2 changed files with 2 additions and 1 deletions
|
@ -165,7 +165,7 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, uint32_
|
|||
btTransform worldTrans = _body->getWorldTransform();
|
||||
_sentPosition = bulletToGLM(worldTrans.getOrigin());
|
||||
properties.setPosition(_sentPosition + ObjectMotionState::getWorldOffset());
|
||||
|
||||
|
||||
_sentRotation = bulletToGLM(worldTrans.getRotation());
|
||||
properties.setRotation(_sentRotation);
|
||||
}
|
||||
|
|
|
@ -141,6 +141,7 @@ bool ObjectMotionState::shouldSendUpdate(uint32_t simulationFrame) {
|
|||
|
||||
// NOTE: math in done the simulation-frame, which is NOT necessarily the same as the world-frame
|
||||
// due to _worldOffset.
|
||||
|
||||
// compute position error
|
||||
if (glm::length2(_sentVelocity) > 0.0f) {
|
||||
_sentVelocity += _sentAcceleration * dt;
|
||||
|
|
Loading…
Reference in a new issue