20.04.2016, 21:59
(
Last edited by NaS; 21/04/2016 at 12:15 AM.
)
Quote:
CheckVehicleGroundContact could be drastically improved. The point of it is to check if the wheels are on the ground, but it doesn't. You are already getting the vehicle's quaternion rotation so why aren't you using rX and rY in the CheckVehicleGroundContact function? With that you could easily get the actual wheel position of each wheel and cast rays from the tires away from the bottom of the vehicle (in the actual direction it they should be going)! Plus, this way you would only need 2 or 4 rays, and if those don't detect the wheels on the ground you can check for the rest of the things (in GCRayMatrix).
Other than that, I love it. |
I'll add that landing on wheels gives more money, after adding the "preferred" wheel check.
However I could reduce the number of rays for the Matrix. Instead of casting to every point, I can cast along the sides (a line which catches 3 points at the sides for example). So it would reduce from 18 to 6 or 8.
Thanks for the suggestion.
EDIT: Added correct rotation (x,y,z), will do the wheel checking when I have time again.