Explorar o código

Merge pull request #1002 from RaananW/impostor-fix

Rotation update fix
David Catuhe %!s(int64=9) %!d(string=hai) anos
pai
achega
be98d6912d
Modificáronse 1 ficheiros con 2 adicións e 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);