Browse Source

Rotation update fix

Raanan Weber 9 năm trước cách đây
mục cha
commit
5fbd3e5cb6
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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);