Angle from Coordinates - 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: Angle from Coordinates (
/showthread.php?tid=444344)
Angle from Coordinates -
RedFusion - 16.06.2013
pawn Код:
new Float:fPX, Float:fPY, Float:fPZ, Float:fVX, Float:fVY, Float:fVZ;
GetPlayerCameraPos(playerid, fPX, fPY, fPZ);
GetPlayerCameraFrontVector(playerid, fVX, fVY, fVZ);
How do i get the 3 angles of where i'm looking from the example above?
Re: Angle from Coordinates -
RedFusion - 24.06.2013
BUMP! I am stuck here, could really use some help.
Re: Angle from Coordinates -
MP2 - 24.06.2013
What angles are you talking about?
Re: Angle from Coordinates -
Shaneisace - 24.06.2013
Nvm miss read.
Re: Angle from Coordinates -
RedFusion - 24.06.2013
Quote:
Originally Posted by MP2
What angles are you talking about?
|
I am going to set the camera behind an object, i want the object to rotate where i look, while the object travels "away" from the camera.
(Sort of how a predator missile rotates in cod)
Re: Angle from Coordinates -
RedFusion - 07.07.2013
Bumping again.
I know it's possible to do with asin, acos, atan but i have no clue on how those mathematical functions work!
Re: Angle from Coordinates -
Stylock - 07.07.2013
I still have no idea what you're asking.
Re: Angle from Coordinates -
RedFusion - 07.07.2013
Let's say i'm looking north, the angle of where i'm looking is 0.
Or maybe i'm looking south, the angle of where i'm looking is 180.
How do i calculate this angle from the vector?
Re: Angle from Coordinates -
Konstantinos - 07.07.2013
http://forum.sa-mp.com/showpost.php?...06&postcount=2
Re: Angle from Coordinates -
RedFusion - 07.07.2013
Yeah that's 1 angle, i want the 2 others aswell if possible