# Wall & Obstacle Collision > Master Wall & Obstacle Collision in Scratch so your games feel responsive, fair, and easy to maintain. Scratch technique guide for Wall & Obstacle Collision: variables, frame loop logic, and debugging tips. ## How the mechanism works Move on X first and undo if touching a wall, then move on Y and undo if touching floor/ceiling—separating axes prevents corner sticking. - Prototype this technique in a blank project first so bugs are easy to spot. - Display helper variables (like speed or state) on stage while tuning. - Tune one number at a time until the game feel matches your vision. ## Implementation checklist Test walking diagonally into a corner of a maze to confirm your character slides cleanly along the wall. ## Related guides Master Wall & Obstacle Collision in Scratch so your games feel responsive, fair, and easy to maintain. - [Project Tutorials](/en/projects/): Combine techniques into complete games. - [Troubleshooting](/en/troubles/): Troubleshoot hitbox, jump, and clone bugs. Updated: 2026-11-23 Author: [Takamasa Suzuki](https://scratch.gmnavi.jp/about/author/) Japanese Edition: https://scratch.gmnavi.jp/techniques/collision/ [Scratch Daizen (English)](https://scratch.gmnavi.jp/en/)