Seeking advice for which movement script to use after lots of trial-and-error

  • A* version: [5.4.6, Pro version]
  • Unity version: [6.3]

Hey. I’ve been going back and forth between FollowerEntity and then AIPath+Seeker in order to try to obtain the movement I want, but I am at somewhat at a dead-end and am a bit of a loss as to what direction to go here, so If you could give me some advice for how you would recommend I go about this whole thing, so that I can just focus on one specific script instead, it would be extremely helpful. I could also consider a custom movement script perhaps, but I am just not very well versed or knowledgeable in this, so I would prefer to avoid it

I am making a 3D game, the agents are enemy creatures with AI controlled by my Behavior Trees and Environment Query System

Requirements for my agent movement/navigation are:

  • Work on Recast Graph, which from my reading seems to be the best suited: supports multiple stories, even and uneven terrain (like caves and multi-story buildings)

  • I don’t plan on having more than 20 agents active in a scene, so ECS performance seems unneccessary if the trade-off is higher complexity

  • Need to be able to traverse off-mesh links

  • Avoidance (dynamic obstacles, player)

  • Modify movement parameters during runtime, based on both states (agent state) and events (agent got hit by a “frost beam”, you get the idea)

    • Adjust Acceleration, Start Speed, Max Speed, Turn Speed (possible to make an agent, like the Thumper in Lethal Company that overshoots destination points, but never actually falls off the graph)
    • Custom overrides, e.g. snail-like movement that multiplies the agents speed between 0 to 1 in a sine curve
  • Need to have maneuvers that temporarily take over, for example a “Lunge” that, for a short distance or period, reduces turn speed by a lot moves the agent towards a destination and possibly overshoots. Think like a monster suddenly trying to grab a bite from you.

  • Option to never leave the graph, preventing overshooting from making the enemy fall off the graph (hard stop). This is what has got me stumped - I tried going from FollowerEntity but met difficulties, went to AIPath and it was a lot easier to work with, but did not work as well with recast graphs without a funnelmodifier - but then, this does not work well with constraining the movement to be on the graph, as the documentation mentions (funnelmodifier + recast graph double whammy)