image collide with floor

BlitzPlus Forums/BlitzPlus Programming/image collide with floor

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.

Actually I'd personally use ImagesCollided. I'd perform the x,y location on what the player "would be" if he moves in the current direction. If ImagesCollided returns true, then perform the same function on the x,y a pixel or two higher up (so that he walks above the terrain). If that says no, then move the player there. Otherwise, start where the player would be when walking forward, and trace the x value back to the player's current pos, unti ImagesCollided returns false.

The problem with this method is that you can end up having quite a lot of ImagesCollided checks in one loop. However, if it's just for one player then it shouldn't be a problem.