浏览代码

Merge pull request #9539 from CedricGuillemet/boundingBoxScaleBug

Fix issue when scaling is reapplied with BoundingBoxGizmo and GizmoManager
Cedric Guillemet 4 年之前
父节点
当前提交
8fdb65b195
共有 2 个文件被更改,包括 2 次插入0 次删除
  1. 1 0
      dist/preview release/what's new.md
  2. 1 0
      src/Gizmos/boundingBoxGizmo.ts

+ 1 - 0
dist/preview release/what's new.md

@@ -49,6 +49,7 @@
 - Fix ArcRotateCamera panning with axis decomposition ([CedricGuillemet](https://github.com/CedricGuillemet))
 - Fix an issue with keyboard control (re)attachment. ([#9411](https://github.com/BabylonJS/Babylon.js/issues/9411)) ([RaananW](https://github.com/RaananW))
 - Fix issue where PBRSpecularGlossiness materials were excluded from export [#9423](https://github.com/BabylonJS/Babylon.js/issues/9423)([Drigax](https://github.com/drigax))
+- Fix issue when scaling is reapplied with BoundingBoxGizmo and GizmoManager ([CedricGuillemet](https://github.com/CedricGuillemet))
 - Fix direct loading of a glTF string that has base64-encoded URI. ([bghgary](https://github.com/bghgary))
 - Fix crash of some node materials using instances on iOS ([Popov72](https://github.com/Popov72))
 - Fix the code generated for the NME gradient block ([Popov72](https://github.com/Popov72))

+ 1 - 0
src/Gizmos/boundingBoxGizmo.ts

@@ -376,6 +376,7 @@ export class BoundingBoxGizmo extends Gizmo {
         if (value) {
             // Reset anchor mesh to match attached mesh's scale
             // This is needed to avoid invalid box/sphere position on first drag
+            this._anchorMesh.scaling.setAll(1);
             PivotTools._RemoveAndStorePivotPoint(value);
             var originalParent = value.parent;
             this._anchorMesh.addChild(value);