mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 00:17:25 +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);
|
int jointIndex = getJointIndex(attachment.jointName);
|
||||||
glm::vec3 jointPosition;
|
glm::vec3 jointPosition;
|
||||||
glm::quat jointRotation;
|
glm::quat jointRotation;
|
||||||
|
if (!isMyAvatar()) {
|
||||||
|
model->setLODDistance(getLODDistance());
|
||||||
|
}
|
||||||
if (_skeletonModel.getJointPosition(jointIndex, jointPosition) &&
|
if (_skeletonModel.getJointPosition(jointIndex, jointPosition) &&
|
||||||
_skeletonModel.getJointRotation(jointIndex, jointRotation)) {
|
_skeletonModel.getJointRotation(jointIndex, jointRotation)) {
|
||||||
model->setTranslation(jointPosition + jointRotation * attachment.translation * _scale);
|
model->setTranslation(jointPosition + jointRotation * attachment.translation * _scale);
|
||||||
|
|
Loading…
Reference in a new issue