You can get the vehicle size (array released somewhere on this forum - SEARCH) and vehicle position (GetVehiclePos) and vehicle rotation matrix from GetVehicleRotationQuat (and creating a rotation matrix with GetVehicleMatrix include), then you can check if a line goes through the sphere the vehicle occupies.
http://stackoverflow.com/questions/2...sects-a-sphere http://gamedev.stackexchange.com/que...here-intersect http://www.realtimerendering.com/intersections.html And bytheway.. it's called "Ray-Sphere Intersection". |