facingangle to point on map - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: facingangle to point on map (
/showthread.php?tid=364444)
facingangle to point on map -
dalkgamler - 30.07.2012
How it is possible to set rotation of a object to a coordinates?
Re: facingangle to point on map -
Mauzen - 30.07.2012
Trigonometry
Something like
[pawn]
new Float:angle = 360.0 - atan2(target_x - own_x, target_y - own_y);
AW: facingangle to point on map -
dalkgamler - 30.07.2012
ok thanks i thougt at trigonmetry but i didn't know the function + rep for you guy