The limits of Blitz3d collisions is that it is sphere against sphere or box or polys.
The shape of a tank being rectangular, if you want a precise collisions system you need to use several colliders sphere.
From my tests, the best way i have found to do a vehicle to walls/obstacles collisions is to create several colliders sphere childs of the vehicle origine with collisions sphere to polys and response stop. Each frame i check if a collision has happened between one of the collider sphere and the wall/obstacles near it, and if yes, i retrieve the infos about the collisions (point,normal), with this is calculate a reflexion vector to push the vehicle away from the wall/obstacle, then i delete all the colliders spheres of vehicle, and then i recreate new colliders sphere around the vehicle.
The reason i delete the colliders sphere and i recreate them is because i have found that ResetCollisions() does not always produce the wanted effect depending on where i use it.
Last edited 2012
|