tires pos - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: tires pos (
/showthread.php?tid=371541)
tires pos -
Sielly - 23.08.2012
I need to get tires pos to check if vehicle crossed the line, any idea how to check it? I need pos of tires. I was trying to attach blank object to vehicle and then use GetObjectPos, but it returns X:0.0 Y:0.0 Z:0.0.. ://
Re: tires pos -
jeremy8810 - 23.08.2012
You really need the tires? otherwise use PlayerInRangeOfPoint ? and make the range 1 or smthing...
Re: tires pos -
Sielly - 23.08.2012
I need tires, because I want to create advanced Spike strip system, so I need pos of tires.. :/
Re: tires pos -
Vince - 23.08.2012
https://sampwiki.blast.hk/wiki/GetVehicleModelInfo
A vehicle has its own coordinate system. The X-axis runs from the left side to the right side, the Y-axis run from back to front and the Z-axis runs from bottom to top with the origin in the exact center of the car. The position of the wheel base is calculated from the center, so you'll need to subtract about 0.5 from the X-axis to get the position of the left wheels and add 0.5 to get the position of the right wheels.
Though, you'd need trigonometry to calculate the world position from the offset position. Unfortunately, I suck at trigonometry, so I can't help you with any functions.
Re: tires pos -
Sielly - 23.08.2012
Quote:
Originally Posted by Vince
|
That is the problem, you didn't say anything what I didn't know, I have no idea how to calculate it to world pos..