Question on Navmesh Layers and Cutting in A*

Hello, I was wondering if anyone could clarify a question of mine about navmesh layers and cutting in A*:

  1. Is it possible to have objects cut on one navmesh layer but read from another? Ex. Player objects cut on the “Player layer” and read the “NPC layer”, while NPCs cut on the NPC layer and read the Player layer.
  2. Even if that did work, there would still be issues where player objects are not aware of each other and same for NPC objects. How would you handle this if local avoidance is not a option? Would a navmesh even be the right way to go about it?

Currently, the only idea I have is to make a object “follow / move towards” an agent that moves much faster than the object but is clamped to a max distance away from that object. That way, you can cut “on the object” but keep the agent out of the dead zone.

Any ideas are appreciated, thank you for reading.

Hi

Well, you could technically do that with two recast graphs and a slightly modified TileHandlerHelper script to update different recast graphs, but I usually discourage this kind of avoidance. Usually some kind of local avoidance (not necessarily the type included in this project) is a better way to do it.

I see, I’m just flustered because I’m working with large, heavy, slow boats. And watching them try to “locally avoid” each other is agonizing.

Yeah, the local avoidance included in the project is more suited to agents that can accelerate quickly. You might have better luck with other kinds of local avoidance systems. Try e.g UnitySteer.

“Try e.g UnitySteer.”

-> Looks interesting, thanks for the heads up. I’ll keep working at it in the mean time, hopefully I won’t end up with too many other questions. Thanks again.