Here’s another post that deals with a similar issue. Math.atan2 on the Y performing weirdly - #7 by Scottifly