I have been trying to make a sort of dash/teleport, where if the player moves in a direction then presses a key, they go a bit forward in the direction they're facing. However, I have been having issues with collision. If the player goes towards a wall/object with collision, they will go into the wall for a split second before going back to their previous position. It makes it look very unpolished. What I need is a way to check if the position the player will teleport to is covered with a collision shape. I have tried using an Area2D to fix the problem but this caused various issues and didn't really fix the problem. Also, I need to make it so if the player does teleport towards a collision shape, they will just teleport next to it instead of locking them out of teleporting.