5.0 Local avoidance strict constraints to area

I avoided the previous version of Local Avoidance because I have sprites and sprite clipping looks awful, but I couldn’t figure out how very strictly constrain agents to my grid (or other graph) performantly so they don’t spill into adjacent areas and produce sorting issues. This wasn’t strict enough since any sprite clipping looked just awful. (I may be misremembering a detail since this was a while ago, maybe I was misusing it.)

Should I try it again in 5.0? Has this been improved?

Also congrats on the next major version.

1 Like

Hi

In 5.0 you can definitely constrain the agents to be on the graph at all times. I’d say it’s especially good with the new FollowerEntity component, but the other scripts also work.

However, in all versions, this clamping will be done such that the center of the agent is clamped to the navmesh. This is because the navmesh is defined such that the surface of it is all valid points for the agent’s center.
The 2D example in that screenshot is an example I wasn’t too happy about, since the graph setup in that scene just lead to a lot of clipping issues, like you mentioned. But there are other ways of configuring the graph so that it does not happen that way.

1 Like