top of page

A.S.A.M. Dev Diary - Enemy Navigation

  • Oct 31, 2016
  • 2 min read

A.K.A. Give Me A Reason To Take Your Jump Away

I spent the better part of a week experimenting with enemy navigation with jumping. I wanted to see if I could come up with a system that would not require significant work on the level building side to set up (I didn't want to have to hand-place, and hand-tune specific jump points if I could help it). I tried two different fundamental approaches.

The first was experimenting with using the navmesh and nav link proxies. This method wasn't in-line with my original goal since I still have to hand place those links, but I wanted to see how far I could go with them, so I better understood it as an option. The way UE4 has implemented the Nav Link Proxies make it difficult to really dictate the behavior using blueprints since there isn't an event or anything that is triggered upon reaching it, it simply tells the navigation system those two points are 'connected' and can be used to reach points on either side. There are some ways in C++ to use but I didn't want to dive into C++ in unreal just yet for this project. I built jump points on those links that would teleport enemies between the two points. I later added the ability for it to calculate a trajectory and force a custom 'jump' without me having to tune variables or anything, but wasn't able to get very consistent or reliable results. As soon as the pawns left the mesh and were airborne their physics and movement got a bit...inconsistent. Furthermore the teleportation wasn't all that fun in testing and felt fairly cheap to fight against. I decided to shelve this method until I better understood all the factors at play with built-in character movement and how it interacts with on/off navmesh navigation.

The second method I tried was using a simplified wall/ledge climb detection system. The enemy would use wall detection cast combined with a wall height detection cast to determine if they are in front of a wall short enough to 'climb' or 'jump' over. I was able to get this system to work decently well, however it did not help the enemies jump gaps or perform horizontal jumps which were a big part of the level. Additionally without animation support it was a little strange to watch, and at the end of the day I could achieve a similar effect by simply tweaking how high of a 'step' the enemies were able to cross according to their controller. Ultimately this led me to cut enemy jumping and adjust the level to allow enemies to always be capable of pathing to the player. Later I may considered bringing back teleportation of some sort on an enemy variant, but the core enemies I decided to move forward with a simpler, predictable enemy.

Comments


Featured Posts
Recent Posts
Archive
Search By Tags
bottom of page