From 544928b46eafaf45e42c94b3e4541f708d6048fa Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Mon, 18 Apr 2016 14:51:33 -0700 Subject: [PATCH 1/2] MyAvatar: fix for laggy avatar attachments --- interface/src/avatar/MyAvatar.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 906f7b4c9f..b362197475 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -340,6 +340,10 @@ void MyAvatar::simulate(float deltaTime) { _skeletonModel->simulate(deltaTime); } + // we've achived our final adjusted our position & rotation for the avatar + // and all joints, we can now update our attachements. + Avatar::simulateAttachments(deltaTime); + if (!_skeletonModel->hasSkeleton()) { // All the simulation that can be done has been done return; @@ -1160,9 +1164,6 @@ void MyAvatar::harvestResultsFromPhysicsSimulation(float deltaTime) { _bodySensorMatrix = _follow.postPhysicsUpdate(*this, _bodySensorMatrix); setVelocity(_characterController.getLinearVelocity() + _characterController.getFollowVelocity()); - - // now that physics has adjusted our position, we can update attachements. - Avatar::simulateAttachments(deltaTime); } QString MyAvatar::getScriptedMotorFrame() const { From 279e77f523e8ccf7b12b485dbe52cf9bd2b02fe2 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Mon, 18 Apr 2016 15:18:08 -0700 Subject: [PATCH 2/2] updated comment --- interface/src/avatar/MyAvatar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index b362197475..dc1b65276a 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -340,8 +340,8 @@ void MyAvatar::simulate(float deltaTime) { _skeletonModel->simulate(deltaTime); } - // we've achived our final adjusted our position & rotation for the avatar - // and all joints, we can now update our attachements. + // we've achived our final adjusted position and rotation for the avatar + // and all of its joints, now update our attachements. Avatar::simulateAttachments(deltaTime); if (!_skeletonModel->hasSkeleton()) {