Download

Jumping AI

Hello!
I want to make my AI to be able to jump. I’ve read several threads, and tutorials about it, but didn’t really find what would satisfy my needs.
I think it should be pretty simple, but I don’t know where to touch, and it’s not very well documented…
Needs are:

  • I would not like to rewrite the whole pathing system, only extend it
  • I would not like to use NavLinkProxies, because if I had to, I’d have to place really lot of them, would scatter the terrain, and would be horrible
  • I want to make destination position to be in the air( can only be reached by jumping. Like coins that need to be picked up )
  • I would not like to modify the engine source. Only extend it by custom components, or some way…

My idea:

  • Modify the path finding algorithm, so when it’s checking if you can move from one segment to another, it will take account the character step height + the jump height( * 0.75 ). Basically, From path finding perspective I would like to enable the path to go through objects which can be jumped on
  • Preferably save this as a flag in the path. It would be nice to remember on which segment do my character have to jump in order to reach the next segment. It’s not necessary, but would be nice, if I could do this.
  • When following the path, the AI checks if it needs to jump( by the saved flag, or calculating on the fly )
  • Allow them to fall down of a ledge, if the path finding requires it. If there is a navmesh beneath the current object, it can fall down. Currently the AI stops on ledges

And basically that would satisfy all my needs. It doesn’t need to be super smart, doesn’t matter if they fail sometimes, falling down.
Can anyone please point me on the right direction? Currently I don’t know which classes and functions to override :frowning:

Sorry for the bad english, thanks in advance