Hello all. So right now I have a system set up where the character can hang from a ledge. There is then an Area2D detecting whether there is space to vault above, if so then upon pressing button a vault is activated and your character goes up and over the ledge using a tween with hard coded values for how far the character will travel. Now the complexity comes in because I’m going to add features where you can vault over ledges of various heights and there are some edge cases with crouching and prone position etc. so I need a way to be able to make a more precise vault to accommodate various heights but I’m not sure how to go about it. Maybe I can snap the body to the edge so it follows it closer but I’m not sure lol, any suggestions would be appreciated, thank you.
Great solution, your reply got me going on the right track though still got some kinks to work out. I have a long downward ray which is slightly taller than the character and a function which returns the distance from the collision to the origin of the ray. I can then use the info to tell how far up the character will go. This will be good too because I’m going to make it so that depending on where it is colliding I can have the character vault over obstacles while running or vault over a ledge while hanging from it, etc. Thank you again