I just posted on your other thread I think.
Let me get the post and stick it here.
Here it is:
---
It's not too bad.
StartCollisionPRO()
StartCollisionDebugPRO()
Define some custom types:
TYPE_ELLIP = 1
TYPE_MESH = 2
Then, are you doing ellip-2-mesh or ellipsoid-to-ellipsoid detection?
For ellipsoid-to-mesh, use the command:
SetCollisionsPRO( TYPE_ELLIP, TYPE_MESH, ELLIP_2_POLY, RESP_STICK, DYN_RESP )
For ellipsoid-to-ellipsoid collision use:
SetCollisionsPRO( TYPE_ELLIP, TYPE_ELLIP, ELLIP_2_POLY, RESP_STICK, DYN_RESP )
Then define which of your objects are meshes and which are ellipsoids. Example:
CollisionTypePRO( pong_ball, TYPE_ELLIP )
CollisionTypePRO( pong_world, TYPE_MESH )
Then move your objects as normal and call RunCollisionPRO() once per main loop.
Then you can detect if you pong ball hit a wall (or paddle) with:
collCount = CountCollisionsPRO( pong_ball )
for coll=1 to collCount
hitObj = CollisionHitObj( pong_ball, coll )
if hitObj = pong_world
rem We hit a wall
endif
next
If we made it any simpler the system would lose its dynamic power.