mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Fix 3D model sizes in the editor when aspect ratio is free (#7115)
This commit is contained in:
@@ -3231,9 +3231,9 @@ module.exports = {
|
||||
: this._originalDepth / modelDepth;
|
||||
const minScaleRatio = Math.min(widthRatio, heightRatio, depthRatio);
|
||||
if (!Number.isFinite(minScaleRatio)) {
|
||||
this._defaultWidth = modelWidth;
|
||||
this._defaultHeight = modelHeight;
|
||||
this._defaultDepth = modelDepth;
|
||||
this._defaultWidth = this._originalWidth;
|
||||
this._defaultHeight = this._originalHeight;
|
||||
this._defaultDepth = this._originalDepth;
|
||||
} else {
|
||||
if (widthRatio === minScaleRatio) {
|
||||
this._defaultWidth = this._originalWidth;
|
||||
@@ -3274,6 +3274,10 @@ module.exports = {
|
||||
this._defaultDepth = this._originalDepth;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this._defaultWidth = this._originalWidth;
|
||||
this._defaultHeight = this._originalHeight;
|
||||
this._defaultDepth = this._originalDepth;
|
||||
}
|
||||
|
||||
this._threeObject.add(this._threeModelGroup);
|
||||
|
Reference in New Issue
Block a user