Download

Suggestions about implementing parkour (and a little ranting)

I am coming over from UDK, and I am amazed to see that UE4 is in the same exact boat - it has no online search-ability whatsoever, there is hardly any information about anything. Why is it that other engines have endless online questions/answers, tutorials, and so on, and Unreal ones have nothing?

Now with the rant done: I want to implement basic parkour functionality, much like Mirror’s Edge and the like. This means wall running, grabbing ledges, running up walls to grab ledges, sliding, and rolling if the player drops from a high enough location.

What I am planning to do, is to create a collision sphere for my character, which will detect wall collisions.
From there, if the wall angle is in some threshold compared to that of the player, he can wall run it (say when the angle is 45 > X < 75, so that the player is partially facing the wall, but not too much).
If the angle is in a lower threshold (say 0 >= X < 40, so that the player mostly faces the wall), he can run up the wall, or grab a ledge if he jumps.
Sliding I believe just means setting up the animation (which again I have no idea how to do through code, or if it’s even possible), and changing the bounding shape to match the animation.
Rolling, like sliding, is probably just an animation and a bounding shape match.

To know if the player can reach a ledge (if by jumping or running up a wall), the technique shown in Overgrowth can be used. That is, sweeping a shape downwards once a wall collision is detected, and checking the difference in heights between the sweep result and the character.

So my first question, am I right with my assumptions? is there something I missed?

And the second and harder question…how do I do any of this?
I can’t even manage to get wall collisions - I tried using GetOverlappingComponents in my character’s Tick function, which causes a crash for whatever reason, and I tried using the OnComponentBeginOverlap/OnComponentHit events, neither of them actually producing any collisions.
I am not asking for you to walk me through this, of course, but I am asking for hints or relevant guides/tutorials, because the API documentation gives no examples whatsoever, and hardly gives any information to begin with.

Thanks.

Here’s the Youtube channel of someone making a parkour game in UE4 and is sharing some techniques to get you started: https://www.youtube.com/channel/UCnllj8iRo-bLdQMZgva_0MA

… ok.

Links:

As for implementing a parkour like movement system, the way your describe is one of many approaches.

Horus has a very impressive system ledge/wall detection here:
[C++]Vertex Based Ledge Detection / Parkour Engine](https://forums.unrealengine.com/showthread.php?49651-C-Ledge-Detection-Parkour-Engine)

With any luck he’ll have that out sometime in the near future.

I know about all of those links, but nowhere could I find anything talking about more complex features, nor does the API documentation bother giving any examples of how to use functions (which I find very helpful when transitioning into a new API and/or language).
What I didn’t realize is that UE4 is only a couple of months old, for some reason I thought it was publicly available for more than two years, so that’s a perfectly fine excuse for the lack of content.

That said, seeing as how almost all of the user-made content is in Blueprints rather than C++ (which baffles me, but whatever), I guess I’ll start with Blueprints and get used to the engine, and later on translate to C++.

Thanks anyway.

Ahh, that explains things :slight_smile:

No, only been out publicly since March 2014, though was in-beta before that.

The Blueprint system is very attractive for all those people with little to no programming skills.

Even for people familiar with C++, using Blueprints for prototyping and extending core C++ logic is common.

Give it time - content is being created all the time.

Normally people aren’t keen to share things they’ve been working on, other engines have been out for considerably longer and used a more common programming language for much longer too, so they had a larger more sharing community.

UE4 is still relatively new, but to be honest when programming you just have to figure out ways to do things yourself. The engine is insanely flexible now, it’s not really beneficial for anybody except the minority to do very specific tutorials on the odds and ends that people want to implement. There is a lot of very high-grade example content to look through, including a complete FPS game with networking and console support for free.

As above, using Blueprints for prototyping and later transitioning to C++ is a good workflow, because it’s fast as sin. I share your frustration with the lack of C++ tutorials though, although Epic has said they are doing C++ equivalents of their Blueprint tutorials, they take a hella-lot longer to come out for some reason, I think they’re just lower priority. Blueprint is the main pull of the engine and used by most of it’s users, so makes sense I guess. Thankfully there are a few C++ wizards around to help!