[help] calculating angles - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [help] calculating angles (
/showthread.php?tid=65810)
[help] calculating angles -
ғαιιοцт - 16.02.2009
in gta:
Код:
north (0)
|
(270)west- -east (90)
|
south (180)
in my calculations (pythagoras):
Код:
north (90)
|
(180)west- -east (0)
|
south (270)
how can i convert the angle that I've calculated, to the type of angle used in gta?
i can't figure it out
![Sad](images/smilies/sad.gif)
it has a difference of 90° each time, and the rotation is also the opposite
//edit i found it:
make the degrees negative by decreasing it with 2xitself
and then add it with 90.0 because the numbers are always +90 ^^
so:
Код:
new Float:Par = floatadd((floatsub(Pa, (floatmul(Pa, 2)))), 90);
Quote:
par = playerangle real (in gta)
pa = player angle
|
Re: [help] calculating angles -
Pghpunkid - 23.11.2009
Quote:
Originally Posted by °ғαιιοцт°
in gta:
Код:
north (0)
|
(270)west- -east (90)
|
south (180)
in my calculations (pythagoras):
Код:
north (90)
|
(180)west- -east (0)
|
south (270)
how can i convert the angle that I've calculated, to the type of angle used in gta?
i can't figure it out ![Sad](images/smilies/sad.gif)
it has a difference of 90° each time, and the rotation is also the opposite
//edit i found it:
make the degrees negative by decreasing it with 2xitself
and then add it with 90.0 because the numbers are always +90 ^^
so:
Код:
new Float:Par = floatadd((floatsub(Pa, (floatmul(Pa, 2)))), 90);
Quote:
par = playerangle real (in gta)
pa = player angle
|
|
Zombie Post.... But...
The correct directions are..
north (0)
|
(90)west- -east (270)
|
south (180)