Browse Source

mark bone as dirty before updating axes viewer

Trevor Baron 6 years ago
parent
commit
08ee9564e2
2 changed files with 4 additions and 2 deletions
  1. 2 1
      src/Bones/bone.ts
  2. 2 1
      src/Debug/boneAxesViewer.ts

+ 2 - 1
src/Bones/bone.ts

@@ -372,7 +372,8 @@ export class Bone extends Node {
         this._skeleton._markAsDirty();
     }
 
-    private _markAsDirtyAndCompose() {
+    /** @hidden */
+    public _markAsDirtyAndCompose() {
         this.markAsDirty();
         this._needToCompose = true;
     }

+ 2 - 1
src/Debug/boneAxesViewer.ts

@@ -55,13 +55,14 @@ export class BoneAxesViewer extends AxesViewer {
         }
 
         var bone = this.bone;
+        bone._markAsDirtyAndCompose();
         bone.getAbsolutePositionToRef(this.mesh, this.pos);
         bone.getDirectionToRef(Axis.X, this.mesh, this.xaxis);
         bone.getDirectionToRef(Axis.Y, this.mesh, this.yaxis);
         bone.getDirectionToRef(Axis.Z, this.mesh, this.zaxis);
 
         super.update(this.pos, this.xaxis, this.yaxis, this.zaxis);
-
+        
     }
 
     /** Releases resources */