From 1119b9f29c92ce049a91f6c46abce7edf7d64def Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Tue, 17 Sep 2019 15:05:37 -0700 Subject: [PATCH] update local QueryAACube on deactivation --- libraries/physics/src/EntityMotionState.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libraries/physics/src/EntityMotionState.cpp b/libraries/physics/src/EntityMotionState.cpp index de82dd6ace..7e4723a7d1 100644 --- a/libraries/physics/src/EntityMotionState.cpp +++ b/libraries/physics/src/EntityMotionState.cpp @@ -122,6 +122,13 @@ void EntityMotionState::handleDeactivation() { _body->setWorldTransform(worldTrans); // no need to update velocities... should already be zero } + if (!isLocallyOwned()) { + // HACK: To allow the ESS to move entities around in a kinematic way we had to remove the requirement that + // every moving+simulated entity has an authoritative simulation owner. As a result, we cannot rely + // on a simulation owner to update the QueryAACube on the entity-server. This HACK updates the local + // QueryAACube but the one on the ES will still be broken. + _entity->updateQueryAACube(); + } } // virtual