mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 07:23:39 +02:00
Merge pull request #7705 from hyperlogic/tony/avatar-attachment-lag-fix
Fix for laggy avatar attachments
This commit is contained in:
commit
8eff47f922
1 changed files with 4 additions and 3 deletions
|
@ -349,6 +349,10 @@ void MyAvatar::simulate(float deltaTime) {
|
||||||
_skeletonModel->simulate(deltaTime);
|
_skeletonModel->simulate(deltaTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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()) {
|
if (!_skeletonModel->hasSkeleton()) {
|
||||||
// All the simulation that can be done has been done
|
// All the simulation that can be done has been done
|
||||||
return;
|
return;
|
||||||
|
@ -1169,9 +1173,6 @@ void MyAvatar::harvestResultsFromPhysicsSimulation(float deltaTime) {
|
||||||
_bodySensorMatrix = _follow.postPhysicsUpdate(*this, _bodySensorMatrix);
|
_bodySensorMatrix = _follow.postPhysicsUpdate(*this, _bodySensorMatrix);
|
||||||
|
|
||||||
setVelocity(_characterController.getLinearVelocity() + _characterController.getFollowVelocity());
|
setVelocity(_characterController.getLinearVelocity() + _characterController.getFollowVelocity());
|
||||||
|
|
||||||
// now that physics has adjusted our position, we can update attachements.
|
|
||||||
Avatar::simulateAttachments(deltaTime);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MyAvatar::getScriptedMotorFrame() const {
|
QString MyAvatar::getScriptedMotorFrame() const {
|
||||||
|
|
Loading…
Reference in a new issue