SA-MP Forums Archive
[HELP] Rotation - 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: [HELP] Rotation (/showthread.php?tid=292680)



[HELP] Rotation - Dirkon - 24.10.2011

Hey,

Maybe this forum is not the place for this kinda question, but it's connected with scripting, cuz I need to make object that rotates where you look. So let's say I have two points in coordinate plane ( if this is how it is called )
pawn Код:
Y
          ^
          |        A
          |
          |  B
          |
----------+----------> X
          |
          |
          |
          |
Let's say A(5; 5) and B(2;1)
How can I find the angle of rotation of line AB ? I mean like B is the place of the object, and A is where I'm standing. So I need it to turn to me. Can anyone help me?

Sorry if you didn't understand something ( I guess you did ) and sorry for bad english.