Collision help?
BlitzMax Forums/BlitzMax Programming/Collision help?
| ||
Hello, I am have absouletely no idea how to do collisions in bmax. The collisions need to be pixel-perfect, but they also need to diffrentiate between collidble(enemys and floors) to non-collible(backrounds). Does anyone know how to do this? |
| ||
there's two relevant commands: CollideImage and CollideRect. There's some samplecode on how to use them in the Blitzmax help. |
| ||
Also, if you care about speed, use CollideRect first, and if that returns true, use CollideImage. There's lots of additional ways of culling the collision checks, but this is the first one you should use. |