Getting the edges of a part using raycast

I’m currently attempting to make a climb animation similar to deepwoken (Until I can find out how to make an actual climbing animation) and I was wondering how I would be able to detect if a player’s torso is near a part’s edge using raycast (Specifically the top edges) so that once they got to the top of the part they would vault over it, or in general be able to vault over objects.

Is there some kind of way I can do this without needing to make hitboxes for every single part?

Personal request, please don’t provide the code for a solution, just the functions if any and how they would work. I want to be able to learn how to use it, thanks!

You could maybe send two Raycast from the torso and the torso going forward. If the Raycast from the torso detects the part and not for the Raycast from the head you’re probably on the edge.

1 Like

I did some reading and tried that exact thing, works really smoothly. I’ll need to make an animation for it and do some minor tweaking but otherwise it works like a charm!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.