Collision detection! Beginner Question

Blitz3D Forums/Blitz3D Beginners Area/Collision detection! Beginner Question

mickybhai(Posted 2006) [#1]
I would like to know what would be the best way to detect collision between 2 cars in a racing game.
Also what would be best way to detect collision with track. Is ellipsoid-to-polygon collisions the best way out?


Stevie G(Posted 2006) [#2]
For the car/track you could use sphere to poly collisions - see the Driver example in the Mak directory of 3dsamples ( used 4 x spheres for collisions with each tire ) or use linepicks.

Collisions between cars is probably best handled using entitydistance and some vertor reflection code as collision response between two moving objects is not accurate and simply doesn't work if both are moving at high speeds.


jhocking(Posted 2006) [#3]
For cars in a racing game I would use a plug-in collision system, like one of the physics libraries, but that's a bit much for a beginner.


Boiled Sweets(Posted 2006) [#4]
Tokamak and EasyTok is the way to go for the beginner. EasyTok even has a wee car demo.