19.01.2010, 20:17
So, I have an object poiting at one direction (at a straight line)
I have 6 coords from that line (with GetXYInFrontOf... (the function works))
How could I detect if a vehicle isn't on that line
I tried taking one set of coords, dividing them (since the division should return the same, eg coords 1,1 and 2,2 will return 1)
and comparing them with the division of the vehicle coords (GetVehiclePos)
but it always says I'm not on the line
http://pastebin.com/m6f4c0abd
I have 6 coords from that line (with GetXYInFrontOf... (the function works))
How could I detect if a vehicle isn't on that line
I tried taking one set of coords, dividing them (since the division should return the same, eg coords 1,1 and 2,2 will return 1)
and comparing them with the division of the vehicle coords (GetVehiclePos)
but it always says I'm not on the line
http://pastebin.com/m6f4c0abd