mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 18:44:00 +02:00
Always update attachments.
This commit is contained in:
parent
f37460e39a
commit
fd0a39df12
2 changed files with 3 additions and 6 deletions
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue