Explorar o código

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

Adam Bowman %!s(int64=8) %!d(string=hai) anos
pai
achega
2d70728ec5
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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;
             }