So I want to create a parkour game, one thing needed in those is vaulting, but I dont know how to make it so you can vault over objects so here we are!
So how can I allow a player so when they are close to a ledge and they press space they well vault over it?
Also another thing how can I make a grappling hook?
Ok so uh yeah no. Lets say I tag a big object right, I want it so you can only vault if you are near the top of it, but If I just tag it then you can vault over it from the bottom(if its 100 studs big that’d look pretty weird).
Whenever the player jumps while sprinting/running, you should fire multiple raycasts in front of the player to determine if they jump or vault over an object. I would fire a good 15 raycasts to make sure we aren’t missing any gaps.
Now, if only the lower raycasts hit something but not the upper ones, the player should vault over the obstacle. However, if both high and low raycasts hit something, the player is probably in front of a wall, so they shouldn’t vault over it.
Just wanted your thoughts, but do you think I should handle most of this client-sided. I dont think it would really matter considering if someone was exploiting they could just fly over it or whatever
Cast a ray from the HumanoidRootPart to its front with distance around 2-5 studs.
If it hits then cast a ray from the Head, the same front 2-5 studs.
If the head ray doesn’t hit then vault them.