From 8b89e0cdb726dc0ec76b33924e9ad0850943571e Mon Sep 17 00:00:00 2001 From: Reece Como Date: Tue, 23 Apr 2024 00:10:42 +1000 Subject: [PATCH] wip --- dist/Action.js | 2 +- src/Action.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/Action.js b/dist/Action.js index 95439a0..9c2b5a3 100644 --- a/dist/Action.js +++ b/dist/Action.js @@ -743,7 +743,7 @@ class FollowPathAction extends Action { const length = this.segmentLengths[index] || 1; const ndx = (endPoint.x - startPoint.x) / length; const ndy = (endPoint.y - startPoint.y) / length; - const rotation = Math.atan2(ndx, ndy); + const rotation = Math.atan2(ndy, ndx); target.rotation = rotation; } } diff --git a/src/Action.ts b/src/Action.ts index 70b648a..80b2055 100644 --- a/src/Action.ts +++ b/src/Action.ts @@ -997,7 +997,7 @@ class FollowPathAction extends Action { const length = this.segmentLengths[index]! || 1; const ndx = (endPoint.x - startPoint.x) / length; const ndy = (endPoint.y - startPoint.y) / length; - const rotation = Math.atan2(ndx, ndy); + const rotation = Math.atan2(ndy, ndx); target.rotation = rotation; }