Set PlayerFacingAngle from GetPlayerCameraFrontVector
#1

How can I set a player's facing angle using mouse vectors?

I need this to make a player face where (s)he looks with his/her mouse.
Reply
#2

pawn Код:
new
    Float: vector_X,
    Float: vector_Y,
    Float: player_Angle
;
GetPlayerCameraFrontVector(playerid, vector_X, vector_Y, player_Angle);
player_Angle = atan2(vector_Y, vector_X) + 270.0;
I guess this is what you're looking for.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)