Angle from Coordinates
#1

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?
Reply
#2

BUMP! I am stuck here, could really use some help.
Reply
#3

What angles are you talking about?
Reply
#4

Nvm miss read.
Reply
#5

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

Bumping again.
I know it's possible to do with asin, acos, atan but i have no clue on how those mathematical functions work!
Reply
#7

I still have no idea what you're asking.
Reply
#8

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?
Reply
#9

http://forum.sa-mp.com/showpost.php?...06&postcount=2
Reply
#10

Yeah that's 1 angle, i want the 2 others aswell if possible
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)