I've just made some basic movement for my 2d game, but I'm having an issue. If my character collides with something on the screen, the character stops moving, but the character's velocity in code still remains, and can even be raised(for example gravity constantly compounding whilst you are standing still, leading to getting teleported off a platform down to the next because velocity has grown as if you are still falling whilst standing on the higher platform, or being stuck to a wall for a few seconds because it takes that long to cancel your velocity towards the wall). Obviously this isn't supposed to happen, but I can't figure out how to stop the character from moving in only the direction where the character collided with something(I can stop the player but then any sideways velocity when landing on something is also cancelled). All I could find on the matter are threads from previous versions of godot with outdated methods that don't seem to work anymore. How would I go about this nowadays?