open.mp forum
[Pawn] angle according to camera position - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] angle according to camera position (/showthread.php?tid=1187)



angle according to camera position - Fixedfeed - 2020-09-27

As the title says, how can I make the angle of the player set according to the direction of the player's camera?

Code:
new Float:Pos_[3];

GetPlayerCameraFrontVector(playerid, Pos_[0], Pos_[1], Pos_[2]);

SetPlayerFacingAngle ( playerid , Pos_[2] ) ;





try this in OnPlayerUpdate, but it doesn't work


RE: angle according to camera position - Y_Less - 2020-09-28

A vector isn't an angle. Look up vectors and the maths to convert them to angles.


RE: angle according to camera position - Fixedfeed - 2020-10-02

Edit: I made it