From 6a9a6968f2ec0e33fbcff24e7f1ddeff5e2db220 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Thu, 22 Jan 2015 13:32:57 -0800 Subject: [PATCH] debugging stutter --- libraries/physics/src/EntityMotionState.cpp | 2 +- libraries/physics/src/ObjectMotionState.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/physics/src/EntityMotionState.cpp b/libraries/physics/src/EntityMotionState.cpp index 9be8a8f50e..8b6fb1ea9f 100644 --- a/libraries/physics/src/EntityMotionState.cpp +++ b/libraries/physics/src/EntityMotionState.cpp @@ -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); } diff --git a/libraries/physics/src/ObjectMotionState.cpp b/libraries/physics/src/ObjectMotionState.cpp index effd7c3e4d..25910556ff 100644 --- a/libraries/physics/src/ObjectMotionState.cpp +++ b/libraries/physics/src/ObjectMotionState.cpp @@ -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;