浏览代码

fixed an issue with the bonelookcontroller slerping and mesh rotation of the first frame

Adam Bowman 8 年之前
父节点
当前提交
2d70728ec5
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/Bones/babylon.boneLookController.ts

+ 2 - 1
src/Bones/babylon.boneLookController.ts

@@ -250,7 +250,8 @@ module BABYLON {
          */
         public update (): void {
 
-            if(this._slerping && !this._firstFrameSkipped){
+            //skip the first frame when slerping so that the mesh rotation is correct
+            if(this.slerpAmount < 1 && !this._firstFrameSkipped){
                 this._firstFrameSkipped = true;
                 return;
             }