I'm trying to make a platformer where the player can use different movement mechanics. One of them is a classic mega man style slide. I can get the player to slide just fine. When the player slides, I switch the width and height so the hitbox is on its side, move the player forward, then change the hitbox back. However, if the top-side of the hitbox (after I change it back to normal) is going to collide with a solid, I want it to keep sliding until there is no collision. Is there a way to do that?