Browse Source

missing _worldMatrix instead of getWorldMatrix()

Cedric Guillemet 5 năm trước cách đây
mục cha
commit
b89a5b1986
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/Gizmos/gizmo.ts

+ 2 - 2
src/Gizmos/gizmo.ts

@@ -115,7 +115,7 @@ export class Gizmo implements IDisposable {
     private _tempMatrix1 = new Matrix();
     private _tempMatrix2 = new Matrix();
     private _rightHandtoLeftHandMatrix = Matrix.RotationY(Math.PI);
-    
+
     /**
      * Creates a gizmo
      * @param gizmoLayer The utility layer the gizmo will be added to
@@ -195,7 +195,7 @@ export class Gizmo implements IDisposable {
             if (camera.parent) {
                 var parentInv = this._tempMatrix2;
                 camera.parent._worldMatrix.invertToRef(parentInv);
-                this._attachedNode.getWorldMatrix().multiplyToRef(parentInv, this._tempMatrix1);
+                this._attachedNode._worldMatrix.multiplyToRef(parentInv, this._tempMatrix1);
                 worldMatrix = this._tempMatrix1;
             } else {
                 worldMatrix = this._attachedNode._worldMatrix;