A detailed animation of the hitbox script The red dot is where the player sprite is currently located. The purple square is the original hitbox The orange/tan square is the additional hitbox for getting out of collisions What the script is doing... It's finding the best way to get out of a collision without zipping through the obstacle If it cannot find a way out, then the player is allowed to zip through the obstacle.