Angles/Headings - 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: Angles/Headings (
/showthread.php?tid=278289)
Angles/Headings -
Joe_ - 21.08.2011
Ok, so..
Usually, I use GetPlayerFacingAngle to get a players heading, I face easterly, and it returns 90.0, which is correct.
However, today, it says 270.0 when I face easterly, and 90.0 when I face westerly. No code change, and it's not a problem with my code.
pawn Code:
new Float:Angle;
GetPlayerFacingAngle(playerid, Angle);
format(str, sizeof(str), "Your heading is: %f", Angle);
SendClientMessage(playerid, 0xFFFFFFFF, str);
360.0/0.0 is North. 90.0 is East. 180.0 is South. 270.0 is West.
Why does it say 270.0 is East, and 90.0 is West?
Re: Angles/Headings -
philldog - 21.08.2011
Are you an retard broooo

? U gotz no skillz in leik degrees n' such bro... nOrTh Is 354.9132492348923 degrEsEsE bRoOoOo.
Re: Angles/Headings -
=WoR=G4M3Ov3r - 21.08.2011
Quote:
Originally Posted by philldog
Are you an retard broooo  ? U gotz no skillz in leik degrees n' such bro... nOrTh Is 354.9132492348923 degrEsEsE bRoOoOo.
|
First of all, You're the retarded one.
@Joe_, Read this
https://sampwiki.blast.hk/wiki/GetPlayerFacingAngle
Re: Angles/Headings -
Joe_ - 21.08.2011
Philldog, you are wrong.
BATAD, I know how to use it, but it returns the wrong angle. If I face east it should say I'm heading 90.0, not 270.0, and vise versa.
Re: Angles/Headings -
philldog - 21.08.2011
bRoOo... HoOooOwWw DuMbBbB R u? U tHiNk U ArE a PiLoT? DuMbAsSsSsSsS... U WaAtChH 2 MeNy MuvVieZ.
Re: Angles/Headings -
Joe_ - 21.08.2011
I am a pilot, go away please troll.
Re: Angles/Headings -
Wesley221 - 21.08.2011
Hm it works fine for me.
Dont know if this would make any difference (probably wont) but worth a try
pawn Code:
new Float:Angle;
GetPlayerFacingAngle(playerid, Float:Angle);
format(str, sizeof(str), "Your heading is: %f", Float:Angle);
SendClientMessage(playerid, 0xFFFFFFFF, str);
@phillguy, l2spell
Re: Angles/Headings -
philldog - 21.08.2011
^.^ Troll mode de-activated was just messing with Joe.
Re: Angles/Headings -
Joe_ - 21.08.2011
That doesn't change anything, Wesley.
When you face EAST, does it say 270 or 90? Mine says 270 and it SHOULD say 90.
Re: Angles/Headings -
Babul - 21.08.2011
its just the direction (counterclockwise) a player facing angle gets returned. imagine watching the player from below the map, then its obvious: the player/vehicle rotations are "left handed"

to obtain the correct angle, simply use -angle
Re: Angles/Headings -
Improvement™ - 21.08.2011
Quote:
Originally Posted by Joe_
Ok, so..
Usually, I use GetPlayerFacingAngle to get a players heading, I face easterly, and it returns 90.0, which is correct.
However, today, it says 270.0 when I face easterly, and 90.0 when I face westerly. No code change, and it's not a problem with my code.
pawn Код:
new Float:Angle; GetPlayerFacingAngle(playerid, Angle); format(str, sizeof(str), "Your heading is: %f", Angle); SendClientMessage(playerid, 0xFFFFFFFF, str);
360.0/0.0 is North. 90.0 is East. 180.0 is South. 270.0 is West.
Why does it say 270.0 is East, and 90.0 is West?
|
It is just how it is, Not to be rude or anything but you will get used to it

.