I'm looking to have a player be able to vault over a short wall/fence/etc... So the idea is if there are standing on one side, interact with the fence, they'll "vault over it" to the other side.
Question is if there is an "easy" way to determine how far the player needs to be moved forward to be clear of the fence and on the other side?
So far, I've thought of using raycasting from the other direction to detect end point or raycasting downwards until I hit the ground.
Ideally, I'd like to take the forward direction of the player and determine which extent needs to be used to get them clearly to the other size (box collider assumed). Is this a reasonable approach?
↧