mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 09:33:36 +02:00
update model location with SpatiallyNestable's locationChanged call
This commit is contained in:
parent
a580442b92
commit
4d60c7bbc0
2 changed files with 10 additions and 0 deletions
|
@ -584,3 +584,11 @@ glm::vec3 RenderableModelEntityItem::getAbsoluteJointTranslationInObjectFrame(in
|
|||
}
|
||||
return glm::vec3(0.0f);
|
||||
}
|
||||
|
||||
void RenderableModelEntityItem::locationChanged() {
|
||||
EntityItem::locationChanged();
|
||||
if (_model && _model->isActive()) {
|
||||
_model->setRotation(getRotation());
|
||||
_model->setTranslation(getPosition());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,6 +71,8 @@ public:
|
|||
virtual glm::quat getAbsoluteJointRotationInObjectFrame(int index) const override;
|
||||
virtual glm::vec3 getAbsoluteJointTranslationInObjectFrame(int index) const override;
|
||||
|
||||
void locationChanged();
|
||||
|
||||
private:
|
||||
void remapTextures();
|
||||
|
||||
|
|
Loading…
Reference in a new issue