2D Collision

Blitz3D Forums/Blitz3D Beginners Area/2D Collision

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

When using 2d graphics, i've always found it better to move your character horizontal first, then check collisions, then move it vertical, then check collisions. That way, you reduce the chance of your character getting stuck or falling through. Also, when collisions are detected, always record the characters previous co-ords. If a collision is detected along the horizontal, then restore the characters previous x co-ord.

Only check once for bullets and such, AFTER you've done the characters movement both ways.