18.10.2012, 07:05
Can some say me how to use GetPlayerCameraFrontVector?
I want to set the velocity of a car in this direction where the player is looking
with his camera. Not the Facing or VehicleZAngle.
I want to set the velocity of a car in this direction where the player is looking
with his camera. Not the Facing or VehicleZAngle.
pawn Код:
new Float:vX, Float:vY, Float:vZ, Float:vA;
new myCar = GetPlayerVehicleID(playerid);
GetVehicleZAngle(myCar, vA);//Here i need the camera rotation
GetVehicleVelocity(myCar,vX,vY, vZ);
SetVehicleVelocity(myCar, vX+=4 * floatsin(-vA, degrees), vY+=4 * floatcos(-vA, degrees), vZ);