MyAvatar: fix for laggy avatar attachments

This commit is contained in:
Anthony J. Thibault 2016-04-18 14:51:33 -07:00
parent b943a664b6
commit 544928b46e

View file

@ -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 {