David Catuhe %!s(int64=6) %!d(string=hai) anos
pai
achega
3c506f35f8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Mesh/babylon.transformNode.ts

+ 1 - 1
src/Mesh/babylon.transformNode.ts

@@ -526,7 +526,7 @@ module BABYLON {
          * @returns this TransformNode
          */
         public setDirection(localAxis: Vector3, yawCor: number = 0, pitchCor: number = 0, rollCor: number = 0): TransformNode {
-            var yaw = -Math.atan2(localAxis.z, localAxis.x) - Math.PI / 2;
+            var yaw = Math.atan2(localAxis.z, localAxis.x) + 3 * Math.PI / 2;
             var len = Math.sqrt(localAxis.x * localAxis.x + localAxis.z * localAxis.z);
             var pitch = Math.atan2(localAxis.y, len);
             if (this.rotationQuaternion) {