This project uses two different methods of collision detection. Move with ⬅️ ➡️ arrow keys. You can change your speed on the left slider. You can toggle simple/fast collision on the right slider. Simple collision detection: This is a common type of collision detection. It's fast, but it's not pixel perfect and if you set a very high speed you can get through walls. Slow collision detection: Unlike the simple detection, this checks if there's a wall in every single pixel, by one by one. This has a pixel perfect landing and it doesn't let you get through walls, but this is much more intense which makes the project slow down.
This is based off this YouTube video: https://www.youtube.com/watch?v=lS_G2XSYVl4 "Atravesar paredes | Solucionando fallos típicos de juegos #1" by Guinxu. (video in spanish) Feel free to use this on any project. Feedback is welcome!