Always update attachments.

This commit is contained in:
Andrzej Kapolka 2014-05-05 16:19:33 -07:00
parent f37460e39a
commit fd0a39df12
2 changed files with 3 additions and 6 deletions

View file

@ -126,7 +126,7 @@ void Avatar::simulate(float deltaTime) {
_skeletonModel.simulate(deltaTime);
}
_skeletonModel.simulate(deltaTime, _hasNewJointRotations);
simulateAttachments(deltaTime, _hasNewJointRotations);
simulateAttachments(deltaTime);
_hasNewJointRotations = false;
glm::vec3 headPosition = _position;
@ -349,10 +349,7 @@ bool Avatar::shouldRenderHead(const glm::vec3& cameraPosition, RenderMode render
return true;
}
void Avatar::simulateAttachments(float deltaTime, bool fullUpdate) {
if (!fullUpdate) {
return; // only simulate if we have new data
}
void Avatar::simulateAttachments(float deltaTime) {
for (int i = 0; i < _attachmentModels.size(); i++) {
const AttachmentData& attachment = _attachmentData.at(i);
Model* model = _attachmentModels.at(i);

View file

@ -190,7 +190,7 @@ protected:
virtual void renderBody(RenderMode renderMode, float glowLevel = 0.0f);
virtual bool shouldRenderHead(const glm::vec3& cameraPosition, RenderMode renderMode) const;
void simulateAttachments(float deltaTime, bool fullUpdate = true);
void simulateAttachments(float deltaTime);
void renderAttachments(Model::RenderMode renderMode);
virtual void updateJointMappings();