mirror of
https://github.com/overte-org/overte.git
synced 2025-04-18 00:26:33 +02:00
update _model's location anytime it doesn't match the entity's location
This commit is contained in:
parent
353f92f1ba
commit
1f3b92577d
1 changed files with 5 additions and 1 deletions
|
@ -298,7 +298,11 @@ void RenderableModelEntityItem::render(RenderArgs* args) {
|
|||
}
|
||||
|
||||
bool movingOrAnimating = isMoving() || isAnimatingSomething();
|
||||
if ((movingOrAnimating || _needsInitialSimulation) && _model->isActive() && _dimensionsInitialized) {
|
||||
if ((movingOrAnimating ||
|
||||
_needsInitialSimulation ||
|
||||
_model->getTranslation() != getPosition() ||
|
||||
_model->getRotation() != getRotation())
|
||||
&& _model->isActive() && _dimensionsInitialized) {
|
||||
_model->setScaleToFit(true, getDimensions());
|
||||
_model->setSnapModelToRegistrationPoint(true, getRegistrationPoint());
|
||||
_model->setRotation(getRotation());
|
||||
|
|
Loading…
Reference in a new issue