ソースを参照

Fix returnToRest + updateMatrix

Popov72 5 年 前
コミット
6eb70c6760
1 ファイル変更2 行追加1 行削除
  1. 2 1
      src/Bones/bone.ts

+ 2 - 1
src/Bones/bone.ts

@@ -244,7 +244,7 @@ export class Bone extends Node {
         if (this._skeleton._numBonesWithLinkedTransformNode > 0) {
             this.updateMatrix(this._restPose.clone(), false, false);
         } else {
-            this.updateMatrix(this._restPose.clone());
+            this.updateMatrix(this._restPose.clone(), false, true);
         }
     }
 
@@ -384,6 +384,7 @@ export class Bone extends Node {
         }
 
         if (updateLocalMatrix) {
+            this._needToCompose = false; // in case there was a pending compose
             this._localMatrix.copyFrom(matrix);
             this._markAsDirtyAndDecompose();
         }