mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 13:13:27 +02:00
add locationChanged to model entities
This commit is contained in:
parent
8bfbb69316
commit
489d4099a7
3 changed files with 11 additions and 0 deletions
|
@ -199,6 +199,8 @@ void AvatarActionHold::doKinematicUpdate(float deltaTimeStep) {
|
|||
|
||||
motionState->dirtyInternalKinematicChanges();
|
||||
|
||||
ownerEntity->setPosition(_positionalTarget);
|
||||
|
||||
_previousPositionalTarget = _positionalTarget;
|
||||
_previousRotationalTarget = _rotationalTarget;
|
||||
_previousSet = true;
|
||||
|
|
|
@ -625,3 +625,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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,6 +73,7 @@ public:
|
|||
virtual glm::vec3 getAbsoluteJointTranslationInObjectFrame(int index) const override;
|
||||
|
||||
virtual void loader() override;
|
||||
virtual void locationChanged() override;
|
||||
|
||||
private:
|
||||
void remapTextures();
|
||||
|
|
Loading…
Reference in a new issue