16.01.2012, 19:58
How do I retrieve coordinates for the side of a vehicle no matter what angle it has? I'm not very good with the advanced mathematical stuff yet.
As I said, I'm not very good with advanced mathematics. I don't know the rest of the equation that I would need...
|
new Float:x,Float:y,Float:z;
new Float:distance = 10; // A distance to vehicle's side point
GetVehiclePos(vehicleid,x,y,z);
new Float:x1 = x + distance * floatsin(90 - angle,degrees);
new Float:y1 = y + distance * floatcos(90 - angle,degrees);
new Float:x,Float:y,Float:z;
new Float:distance = 10; // A distance to vehicle's side point
GetVehiclePos(vehicleid,x,y,z);
new Float:x1 = x + distance * floatsin(270 - angle,degrees);
new Float:y1 = y + distance * floatcos(270 - angle,degrees);