|Topic was automatically imported from the old Question2Answer platform.
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
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 ?
NVM this works perfectly fine.
Apparently In Godot a rotation of 0° defaults to a vector pointing right
so my degress were simply not matching godot’s standard.
quizzcode | 2021-08-30 07:29