[help] calculating angles
#1

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
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

Reply
#2

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
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)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)