Search Unity

Question Per-Agent Obstacle

Discussion in 'Navigation' started by Piflik, Apr 21, 2021.

  1. Piflik

    Piflik

    Joined:
    Sep 11, 2011
    Posts:
    293
    I have multiple agents that should navigate a shared space. These are supposed to be robots with a certain sensor radius. If one of the robots comes close to an obstacle, it should calculate a new path, taking this obstacle and possible earlier detected obstacles into account.

    I don't want the agents to cooperate, so if one agent detects an obstacle, the others should still ignore it and continue on their paths and even calculate new paths treating these obstacles as non-existent.

    If I activate
    carving
    on the obstacle, this NavMesh change applies to all agents, and triggers an immediate repath if the carved area intersects an existing path, even if
    autoRepath
    is turned off in the agent (this might be a bug, but apparently it has been like this for at least 3 years).

    Would something like this be possible with Unity's navigation system, or would I have to find/write something custom?