mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 09:54:14 +02:00
move the _model.setScaleToFit( largest dimension) to the setProperties not update
This commit is contained in:
parent
17a20ceb16
commit
f1326e91b9
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,6 @@ void ModelOverlay::update(float deltatime) {
|
|||
if (_updateModel) {
|
||||
_updateModel = false;
|
||||
|
||||
_model.setScaleToFit(true, _scale);
|
||||
_model.setSnapModelToCenter(true);
|
||||
_model.setRotation(_rotation);
|
||||
_model.setTranslation(_position);
|
||||
|
@ -70,6 +69,7 @@ void ModelOverlay::setProperties(const QScriptValue &properties) {
|
|||
QScriptValue scaleValue = properties.property("scale");
|
||||
if (scaleValue.isValid()) {
|
||||
_scale = scaleValue.toVariant().toFloat();
|
||||
_model.setScaleToFit(true, _scale);
|
||||
_updateModel = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue