Vaulting over a wall (first person)

I’m trying to implement a vault over wall feature but am running into trouble. Right now I set up the “vaultable wall” to have a trigger and when the player enters the trigger and presses “space”, it plays the vault animation. My issue is that it seems to only vault/animate on one side/in one spot. If I am on the opposite side of the wall or on the edge and try to vault it will teleport the player to the specific position and play the animation on that side.

I tried animating it so its local and not global but I guess thats the wrong approach.

Heres a video showing what I’m trying to explain

How you detect the side and setup the landing spots? It looks like you have setup one start & end and it will translate you between those no matter which side you activate the box.

I’d make two “end points” to each side of the box, and when interacting with it, use Vector3.Angle to detect whether I’m in front or back of the box and then decide into which end point to teleport.

I have ONE-WAY ladder system which sets up starting and ending points (and moves character between their vector direction) so I don’t have same problem but probably later need to make it bi-directional :smile:

Your question would need some code shared in addition.

While trying to research the subject I found this excellent tutorial

https://www.sharpaccent.com/?c=lesson&cid=22&id=149

1 Like