Retrieving coordinates from vehicle side
#1

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.
Reply
#2

Use floatsin(), floatcos().
Reply
#3

As I said, I'm not very good with advanced mathematics. I don't know the rest of the equation that I would need...
Reply
#4

Quote:
Originally Posted by SWEMike
Посмотреть сообщение
As I said, I'm not very good with advanced mathematics. I don't know the rest of the equation that I would need...
Okay, you aren't very good at maths, so I will try to explain:
To right side:
pawn Код:
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);
To left side:
pawn Код:
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);
I hope you understand this.
Reply
#5

Thank you! I'm not good at this kind of math yet. I'm in the electricity and energy program in school though and we have to learn trigonometry and stuff soon. I just wanted to defend my manhood. LOL Seriously, I will probably get the hang of it completely when I actually try to learn it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)