update _model's location anytime it doesn't match the entity's location

This commit is contained in:
Seth Alves 2015-10-17 20:08:25 -07:00
parent 353f92f1ba
commit 1f3b92577d

View file

@ -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());