Hey there
I'm trying to define the cardinal direction from TARGET to TOWER node.
Tower is fixed and target move. I need to define weather the monster is NE from the tower or S to match the directional animations I have for the tower.
I'm ALOMOST there. maybe someone can check this and let me know how to fix it ?
I start by using
TOWER.position.direction_to(TARGET.position)
then i use to define an angle.
But I find this angle weird and not matching "normal" angles such as 90, to25, to 45 etc...
angle = rad2deg(angle.angle())
Then I have a list of IF/ELIF angle>=90 and angle <= 45 makes cardinal = N.
But this doesn't seem to be working properly.
Any idea on how I could approach this ?
Thanks !