Set the LOD distance on attachments (controls the load priority, too).

This commit is contained in:
Andrzej Kapolka 2014-05-09 15:25:48 -07:00
parent 0474375a39
commit 3329cb7638

View file

@ -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);