Explorar el Código

Rotation update fix

Raanan Weber hace 9 años
padre
commit
5fbd3e5cb6
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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);