소스 검색

Merge pull request #1002 from RaananW/impostor-fix

Rotation update fix
David Catuhe 9 년 전
부모
커밋
be98d6912d
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/Physics/babylon.physicsImpostor.ts

+ 2 - 0
src/Physics/babylon.physicsImpostor.ts

@@ -213,6 +213,8 @@ module BABYLON {
             //conjugate deltaRotation
             if (this._deltaRotationConjugated) {
                 this.mesh.rotationQuaternion.multiplyToRef(this._deltaRotationConjugated, this._tmpRotationWithDelta);
+            } else {
+                this._tmpRotationWithDelta.copyFrom(this.mesh.rotationQuaternion);
             }
 
             this._physicsEngine.getPhysicsPlugin().setPhysicsBodyTransformation(this, this._tmpPositionWithDelta, this._tmpRotationWithDelta);