Browse Source

Merge pull request #8666 from CedricGuillemet/fixGizmoGroundMesh

fix gizmo update for some meshes like GroundMesh
Cedric Guillemet 5 years ago
parent
commit
dd68fab6c0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Gizmos/gizmo.ts

+ 1 - 1
src/Gizmos/gizmo.ts

@@ -194,7 +194,7 @@ export class Gizmo implements IDisposable {
             }
             }
 
 
             camera.position.copyFrom(this._tempVector);
             camera.position.copyFrom(this._tempVector);
-        } else if (this._attachedNode.getClassName() === "Mesh" || this._attachedNode.getClassName() === "AbstractMesh" || this._attachedNode.getClassName() === "TransformNode") {
+        } else if ((<Mesh>this._attachedNode)._isMesh || this._attachedNode.getClassName() === "AbstractMesh" || this._attachedNode.getClassName() === "TransformNode") {
             var transform = this._attachedNode as TransformNode;
             var transform = this._attachedNode as TransformNode;
             if (transform.parent) {
             if (transform.parent) {
                 var parentInv = new Matrix();
                 var parentInv = new Matrix();