Support Forum

Following an ever growing path

So for context, let’s I want an AI to follow a player’s “footsteps”.

When the “footsteps” get near to the AI, it follows the footsteps.

I tried

  1. setting the destination for each individual footsteps (each footstep position are very condensed and super close and overlapping each other). but it keeps stopping at every destination before moving on to the next destination.
  2. Checking for “remaining distance” but the distance between each footstep is was way too inconsistent .
  3. I tried setting slowdown to 0, but that doesn’t seem to work.

So i then I tried CreateFakePath.
But that only works for predetermined paths, however in my case, the player’s footsteps keeps growing when they keep walking .

The only other solution I can think of, is basically chunking the path whenever the AI reaches the "end’ of the fake path, it creates another chunk from the player’s paths so far.

Any recommendation for this?

I think your fake path approach is reasonable. Update it every second or so with the latest path, or whenever the agent reaches the end of it.