I was struggling to properly animate my top down enemies with dynamic 4 directional movement (not trying to sound smart, i just dont know how to describe it better )…
When suddenly i had the genius idea of simply using angles, and it works!!!
…but while i was figuring stuff out, i foud out that “AngleToPosition” didnt go to 360º, instead it goes between -180 to +180.
The reference 0º being directly to the Left of the object, which is odd to me as well, since i thought 0º in GDevelop was to the Right of the Object, kinda like how RayCast works. (or am i mixing that up?)
Before putting my idea into practice i decided to see the actual values of “AngleToPosition”, so i made a Text object displaying a variable that was constantly being updated with “AngleToPosition”, between my player character and the closest enemy, thats when i saw it.
the values go something like…
…90º
0º… 180º
…-90º
…positive degrees go above the Object and negative degrees go bellow the Object.
So, is that normal? …im mostly just curious