How to make AI Character jump without using Nav Link?

I want the AI character to jump to move to a specified direction just like the way a third person character jump when pressing the key.

So far I have tried calling the Jump node in a Behavior Tree task, followed by a MoveTo node, but all it does is jumping up and down in one place.

There’s also no documentation on how to do this with Unreal, so far all I could find about jumping is using Nav Link to make the character jump to travel specific parts of the environment. For my use case I want to make the character jump whenever appropriate in the Behaviour Tree.

Any advise is greatly appreciated.
Thanks

You and I are in the same boat. I have been looking for an answer to this for about a year now with no luck. I’ve asked on forums and during Live Streams without help. has a tutorial on this but leaves out the most crucial part – JUMPING. Here is the link to that tutorial: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

Maybe you’ll have better luck with it than I did.

Cheers!

The Wiki is down. If somebody knows a way to jump onto higher ledges and jump off ledges for AI without Nav Links, would be cool. On buildings with bigger ledges nav links make no sense, AI should jump up/down on nearest point to a edge and not searching nearest nav link.

Any advise would be welcome!

Yeah this is such a tough one. Unreal’s base A.I movement control its really limited currently. A Nav link is absolutely vital to imply that one part of a Navigation Mesh links to another.

But for the jumping, in the past I have added Actors around my scenes that act as “JumpTo Nodes”. I’d add in a node which represent the arrival point of the jump, then add in Trigger volumes, that act as potential starting points for the jump (They can be linked together VIA an array inside the Jump To Node). Then when an A.I overlaps one of the trigger points, The A.I “Jumps” with a Lerp animation that bounces the A.I using a timeline from the Trigger Point to the Linked Landing point.

However, you still would need a nav-link to communicate to the AI that those two points still link together. As a result, the AI will walk Towards the nav link, overlap with the jump trigger and arrive at the top.

May I ask why a Nav link isn’t an option for you?

@ChristianMaund: Thank your for your advises.

> May I ask why a Nav link isn’t an option for you?

I think the question is up to me.

Of course you can ask. :slight_smile: On buildings with bigger ledges nav links make no sense in my opinion, because AI should jump up/down on nearest point to a edge and not searching nearest nav link.

Consider a scenario, on which AI is chasing behind the player and player jump in a build with different height levels (platforms) from platform to platform (also up and down on higher and lower levels). Then you want the AI to go straight to the player, and not searching if some meters to left or right is a nav link. AI should go straight to player and then jump up/down on its way to the player.

But not only chasing a player directly is the case where more dynamic solution as nav links make sense. Also when AI perception triggers like “make noise” or “got damaged” and AI makes a “ai move to” to the “location” where the shot came from or the position the shot is fired (simple AI move to), then AI should on very wide ledges not search foor nearest nav link but go straight to the point it should move to.

If someone have a 2d sidescroller, of course your will have no problem here. But if you move in 3D and have buildings and platforms with ledges of 5-30 meters (big containers, etc) then you have to use navlink on a 30 meter edge every 0,5m or something like that to make it smooth and not look like AI is searching for nav links. And when having a lot of plattforms/heigt-levels you will have really many, many needed nav links in every level on every ledge.

I think about your solution. By reading it once, I have not understand the solution. :slight_smile: But I will take my time. :wink:
If anybody else has a good idea to make AI jump onto and off wide ledges of several meter without putting in big bunch on nav links on every ledge in the game, would be still ice to read!
Big thanks to ChristianMaund for his idea.

I understand what you are saying, But as it currently stands Nav links are the only way for an AI to determine that two navigable regions are linked using the engine’s built in tools. To work around this would require the development of an extremely sophisticated AI navigation tool, which I imagine is beyond a solution you’d be interested in, as my guess is it would require months of training and work as you would to learn to develop AI C++ classes yourself. Otherwise you’ll have to track down an external advanced AI navigation tool, which could be potentially extremely expensive.

This is a topical issue for me, because I’ve been wanting better A.I navigation systems for years including but not limited to (A.I Swarm navigation, A.I Wall/Ceiling Navigation, Areal Navigation, Smooth Movement, and of course Dynamic Navigation Linking)

The only workaround for this issue is (Like you said) to add multiple navigation links, because the more you have, the more intuitively your AI will behave, even if it does look chaotic. A Better tool than Nav Links could exist, but it isn’t currently built into the engine. Otherwise you’re just going to have to come up with some other creative solutions that exploit aspects of the engine’s Navigation system.

Here is a great report on the navigation of A.I as well as some helpful exploitative techniques. The author is also very informative and should help you master the Nav Mesh system so you can find some handy solutions to your problem.

I hope that helps!

1 Like

Wow, impressive work at that link. I have not read it but content seems to be great!
How did you find it?

I can program c++, have edited some engine plugins form marketplace and made some base classes. But most of the time I use BP, it’s easier for me. Yes, the UE4 market place could habe a solution. I saw a solution for walking on walls with spiders already. Could be something for you.

I thought about changes needed on built in navlinks. I think the solution do not have to be ultra generic. Perhaps I can modify engine code. I think it would be totally suitable when the nav link do not link two single points, but have a box volume on both ends, like a trigger box. And on both ends you could scale the volumes bigger, and everything of the navmesh which is in the navlink will be links. Of course this algorithm has to be somewhere in “ai pathfinding” itself also. That would be great and you could simply link long ledges dynamically with such a technique.
Just as idea, I think in my first shot I will stick with nav links.

I’m glad the link was helpful, I found it when learning about UE4’s A.I tools and looking at alternatives. It’s a very insightful read as it talks about the strengths and limitations of UE4’s “Navigation mesh” feature, as well as alternatives such as Voxel Navigation.

A.I behaviour is an immensely complex subject, some people dedicate their entire careers to getting anywhere with it, but if it is something you can wrangle with in C++ it will make you a very valuable asset to many companies, and if A.I is your focus it is worth exploring. since things like UE4 only have rudimentary tools for A.I, if you can expand on them by modifying Unreal assets that would be incredible and I’d suggest you do that. You could even make a pretty penny by selling them on in marketplaces and such, as they are very much in demand.

Once I made a Blueprint that allowed me to draw two splines, and then it added Nav Links along the length of them. Which would work for ledges as you describe, but it was hacky. if you can design a C++ alternative that acts on volumes, as you say, that would be a much better and far more efficient solution to the problem.

My best advice would be to make Construction scripts that dynamically place Nav Links as I described, as it is relatively quick and easy to modify. Creating your own nav tools fit for your purpose is ideal, and you can even program A.I prompts such as jumping into the same scripts to save time.

With all that said, I’ll leave a summary of my suggestions:

  1. The Fastest (But Worst): Place Lots of Nav Links
  2. The Most Efficient (Cheap): Make construction scripts that dynamically place nav links.
  3. The Most Efficient (Costly): Buy Sophisticated A.I systems from online sellers
  4. The Most Useful: Modify Existing C++ Code to create new A.I functionality in engine.
  5. The Best (But Most Time Consuming and Challenging): Write new A.I Systems and Tools for UE4

I wish you the very best luck! I hope you find what you need.!

1 Like

Great summary! Thanks a lot for the discussion and your advises!
Also best wishes for you.