tires pos
#1

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

You really need the tires? otherwise use PlayerInRangeOfPoint ? and make the range 1 or smthing...
Reply
#3

I need tires, because I want to create advanced Spike strip system, so I need pos of tires.. :/
Reply
#4

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

Quote:
Originally Posted by Vince
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/GetVehicleModelInfo
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.
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..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)