14.10.2011, 18:05
(
Последний раз редактировалось roleplay501; 14.10.2011 в 18:42.
)
Uploaded with ImageShack.us
Here is what im meaning, using SetCameraBehindPlayer won't help me..
Getting player facing angle is possible
and X,Y defined already (distance between points)
so possible to find the camera XY, but i dont know how to use
floatsin and floatcos or tan... w/e.
this will work?
#define Distance 1.5
#define deg (180.0 + 20.0)
CameraCoords(playerid, &Float, &Float:y)
{
new Float:a;
GetPlayerPos(playerid, x, y, a);
GetPlayerFacingAngle(playerid, a);
if (GetPlayerVehicleID(playerid))
{
GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
}
x += (Distance * floatsin(-a + deg, degrees));
y += (Distance * floatcos(-a + deg, degrees));
}