From acb3163f4306c59d5f4aba74897149cea87ce1d6 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Tue, 2 Jun 2015 17:20:41 -0700 Subject: [PATCH] add comments for future work --- libraries/entities/src/EntityScriptingInterface.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libraries/entities/src/EntityScriptingInterface.cpp b/libraries/entities/src/EntityScriptingInterface.cpp index c1c13a832c..5a897f7fe7 100644 --- a/libraries/entities/src/EntityScriptingInterface.cpp +++ b/libraries/entities/src/EntityScriptingInterface.cpp @@ -143,15 +143,22 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, EntityItemProperties proper // make sure the properties has a type, so that the encode can know which properties to include properties.setType(entity->getType()); if (properties.hasTerseUpdateChanges()) { - // we make a bid for (or assert) our simulation ownership auto nodeList = DependencyManager::get(); const QUuid myNodeID = nodeList->getSessionUUID(); - properties.setSimulatorID(myNodeID); if (entity->getSimulatorID() == myNodeID) { // we think we already own the simulation, so make sure to send ALL TerseUpdate properties entity->getAllTerseUpdateProperties(properties); + // TODO: if we knew that ONLY TerseUpdate properties have changed in properties AND the object + // is dynamic AND it is active in the physics simulation then we could chose to NOT queue an update + // and instead let the physics simulation decide when to send a terse update. This would remove + // the "slide-no-rotate" glitch (and typical a double-update) that we see during the "poke rolling + // balls" test. However, even if we solve this problem we still need to provide a "slerp the visible + // proxy toward the true physical position" feature to hide the final glitches in the remote watcher's + // simulation. } + // we make a bid for (or assert existing) simulation ownership + properties.setSimulatorID(myNodeID); } entity->setLastBroadcast(usecTimestampNow()); }