Equipment UI


Author: Aaron King


This week I had a similar issue to last week. Where when doing any kind of screen-to-world math the output is always mirrored what it should be. This week it was happening when I was creating a radial UI for the item equipping.  I was getting the mouse position and finding the angle of where in the radial UI it would be, assuming each piece converges at the center. I spent about an hour thinking my math was off in some place and eventually just had to take a step back since nothing I did was seeming to fix the issue.

After taking a few minutes to really think about it, I finally found the issue. The camera has been rotated 180 degrees this whole time. This was causing all of my screen to world points to be mirrored, thus making it appear that my math was wrong somewhere. But instead of flipping the camera and having to fix all the potential issues that would cause down the line, I ended up just flipping the radial wheel to match and now everything lines up perfect and you can select the correct nodes based on the position of the cursor.

Leave a comment

Log in with itch.io to leave a comment.