Agent stuck to edge of graph

  • A* version: 5.2.3
  • Unity version: 6000.0.23f1

Hi there again,

I have an issue where an agents keep getting stuck to the edge (or close to) of a grid graph for no apparent reason.

I have been doing a lot of experimenting why this might be the case but I’m stuck, hence I’m here again :wink:
So far I’ve tried or confirmed:

  • hasPath=true, canmove=true and isstopped=false for every frame
  • node when stuck is always connected to walkable destination node
  • most of the times the agent slightly rotates back and forth, like jittering
  • sometimes it also super slowly moves (like 0.000001 in some direction) and after quite a while it manages to move on
  • I fiddled with desired wall distance, with agent radius, with grid graph diameter, node size and erosion in every direction to no avail
  • agent collider is turned off (and had no collision with any object before whatsoever)
  • sometimes when i disable the obstacle alltogether it moves on
  • the destination of the followerEntity is only set sparcely, so this jittering does not come from that

Thankful for every help

Best regards,
Daniel

Are you using local avoidance? Also that video isn’t playing nor downloading on my end. May want to try reencoding/reuploading it?

Oh you’re right, damn.

Maybe this works for a while longer…

I am not using local avoidance

Hi

Would you mind setting A* Inspector → Settings → Graph Coloring = Hierarchical Node Obstacles, and see if you see an unexpected obstacle in front of the agent?

I am not quite sure what I am seeing here.

In “GraphColoring = hierarchical node” there are some white boxes


in “GraphColoring = NavMesh Border Obstacles” too.