mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 09:44:21 +02:00
Set the LOD distance on attachments (controls the load priority, too).
This commit is contained in:
parent
0474375a39
commit
3329cb7638
1 changed files with 3 additions and 0 deletions
|
@ -370,6 +370,9 @@ void Avatar::simulateAttachments(float deltaTime) {
|
|||
int jointIndex = getJointIndex(attachment.jointName);
|
||||
glm::vec3 jointPosition;
|
||||
glm::quat jointRotation;
|
||||
if (!isMyAvatar()) {
|
||||
model->setLODDistance(getLODDistance());
|
||||
}
|
||||
if (_skeletonModel.getJointPosition(jointIndex, jointPosition) &&
|
||||
_skeletonModel.getJointRotation(jointIndex, jointRotation)) {
|
||||
model->setTranslation(jointPosition + jointRotation * attachment.translation * _scale);
|
||||
|
|
Loading…
Reference in a new issue