Hello! I’m not sure if this is the right place to post this, but it is for a character. Though if needed, I can delete the post. I’m developing a game in the style of doom/duke nukem, and I’m struggling to get 8 way sprite rotation working.

It works, but only in one direction. Although the sprite changes, it only faces in the direction of X direction. The purple arrow points to where the “front” of the sprite is, and I can’t seem to figure out how to get the sprites forward direction to change to the direction of the arrow.
This is the code used to get the rotation for the sprite itself facing the player. I can provide more information, or the project file if needed.


