[C++] Ledge Detection / Parkour Engine

After much thought I decided to re-post my WIP thread.

This is a vertex-based ledge detection engine which I’ve been working on. It currently has the usual vaulting,high vaulting, ledge climbing, ledge movement, ledge contour, and so on.
In the following video - might not be noticeable since I moved the camera - there is a bug, well its not a bug, its a temporary fix, basically since I’m a terrible animator, my ledge contour animation hits the wall, so to prevent it I added a small Y offset, so when he goes around the ledge, his hands/body aren’t in the right place, but hopefully the animation problem will be solved soon and I can remove the offset.

My approach isn’t better than other engines you can find in the forums (e.g. Alex3D’s), actually its worse; it came to life because I’m stubborn, I decided I had to try to make an engine version that as far as I could see, none had attempted before, and well, here it is. The goal is to use the information the Engine already has, making is at cheap as possible, as well as no raytracing in the entire process, from the detection, to movement restrictions,etc, and I’m pretty close to it - only one raytrace remains. There is a lot to be done in terms of algorithm, as it stands, it works fine for straight meshes, but if you add a rope or something with a curve, the character movement wont adapt. The good news is, it can easily be added - or so I hope. Anyway the video follows, any criticism is welcome:

i like it

Does it work with static meshes, bsp & terrain?

Just curious :slight_smile:

Either way, looking good, as always.
Sometimes it pays to be stubborn.

Thank you both for your replies.

@Kris- In theory, yes, in practice, no because I restricted the action to Meshes - on purpose to allow for a greater control of the behavior.

PS- Rule 21 is a good life lesson ahah

Very nice! It is looking good.
I am looking forward to see where this is going.
Also, why did you choose to use C++,instead of BP?

@Alex3d- Well, again because I’m stubborn lol. I like things organized in one place, and I like the text format, always did. BPs can be - or not, depending on who’s using it - unorganized, and well they are limited to the existing ones, as for code, well your imagination and engine are your limitations. Plus there are already a lot of BP solutions out there, so I thought I’d give it a shot in C++, and well, I’m not disappointed. Just wish I could make things like Machine States in code as well! Last but not least, BPs are prone to error when migrating from project to project - as far as I can tell, or maybe, that’s just me wanting to dislike BP’s lol.

Maybe one day I’ll reach the complexity of your engine, but as far as I can tell, that day, if it comes, is far away.

There is another project like ours, Third Person Locomotion, from murraythis.
Lots of ledge climbing system coming out these days. kkkk Glad to see so many projects like this. :slight_smile:

Looks great! Interesting approach, can see a lot of benefits. Does it work with concave ledges?

@Alex3d- Yeah I noticed that. Starting to think we should either join forces and make a better engine, or should starting working on something else because it makes no sense to have 3 people doing the same lol. Sounds pretty counter-intuitive.
@murraythis- Well like I stated in the initial thread, when I first started I wanted to make it work only on horizontal ledges, so that’s how it works for the time being. But, since I’m working with a vertex based algorithm, I will add concave ledge support, makes perfect sense, its a must-have!

Months ago I was looking for something like this and gave up. I’m sure I could do it now, but haven’t had a need.

Could I ask how you accomplish ledge climbing without ray tracing? Just high-level concept is all I’m asking for. I can’t think of another way myself!

Great work!

Using collision, provides a more accurate solution

Well, since you all have different approaches, it would be interesting to see these been taken a little bit further, so that the best way can be determined. Then you can combine forces over this best practice :slight_smile:

I am looking forward to trying all these. Does any one know how these will look in FPS? Will it be too cramped for any real overview of your climbing situation, and will you have to make your own (and distorted/stretched) animations/meshes specific for player, so that everything looks good, both form multiplayer and first person view?

@oasf- I honestly don’t think this is a good approach, it is accurate, very accurate, but it works just like I want it to: only on the specified meshes, giving me and my team as much control as possible. Alex’s solution is by far more generic.
As for the FPS look, I will let you know once I get there, I plan on using only one mesh, meaning, 3P, and from there generate the first person view, for MP purposes.

Sorry for not updating the thread lately, I have been focused on another project and to be honest, at the time I wasn’t quite sure how to implement this, but today, I decided on the best way to do it.
Note: The content of the video is in a very primary state, it needs to be polished, needs animations, and so on. All I added was the functionality, you’ll see the character is off by a bit, I didn’t add local states meaning, the movement isn’t working properly, and so on.
So what have I added? The ability for the character to check and move to other ledges, in case they can’t keep moving on their current ledge (At about 0:08/0:09).

So whats next?

Well, first of all, I need to polish the code and add the missing features I specified above; secondly, I’ll work on the capability to to the same but backwards and sideways, in case there is no ledge to grab onto (so basically, a jump to a ledge on the side, Assassin’s Creed style), which should be pretty easy now that the main algorithm is finished, as well as adding support for tilted ledges, which is partly done. Secondly, animations, vaulting, and so on - since the systems are now all ready. Thirdly, finish the multiplayer support, the entire engine is structured to support multiplayer, but a lot has to be moved and tested.

This is a really good approach and seems cool in terms of your methods. This is a great technique for those who don’t want to spend months on working with an open world where they want individual actors to trigger climbing like infamous.Here are a couple of suggestions.

  • Try making a sort of construction script that updates in game like a real time navigation system that traces everywhere a pawn can move and look for meshes or areas that are climbable and perform a bunch of traces and set those two little socket things on the corners of each ledge. Will be pretty hard. Then the easier part is make transition points like the one made by FTC’s adventure kit so it will ease pathfinding and animations like assassins creed. It will give smooth believable parkour instead of a floaty one like in infamous

  • Curved edges, poles, window frames, small rocks, beams, ziplines, etc. This is all in parkour.

These are really important features and might want to take a look at navigation system and edit it. A volume that will perform all these checks and set points will be a very powerful tool. Good luck!

Sorry for the late reply, I havent really found time nor passion to work on this project, honestly I thought of sharing the code for free a few times already, or even to find another programmer who is interested in continuing this project.
As for your comments:

  • there are no sockets involved, everything is driven by a vertex based algorithm;
  • as for the volume/ navigation idea, this is already part of the roadmap, once the basics are done Ill work on it (well, that was the plan lol)

Thanks for the support! =)

I would be glad to continue your work Horus. Do you have what you did so far? Or I can work with you!

I’m editing the code, adding support for a few more things, then I’m giving ya the code =)

Any update on this? :slight_smile:

I’d also like to know if this is still ongoing. I’m interested in learning more about ledge detection systems like this one.