Search Unity

NavMesh Areas

Discussion in 'Navigation' started by Ben_Iyan, May 25, 2017.

  1. Ben_Iyan

    Ben_Iyan

    Joined:
    May 13, 2016
    Posts:
    204
    I've read the documentation on this, as well as a number of similar forum questions. For some reason, however, I can't get it to work, so I must be missing an important step.

    What I've tried is:
    Create a new area called City with its associated cost in the Areas tab of Navigation;
    Create a cube in the scene. It has a Mesh Renderer and a Box Collider, and I added a RigidBody component;
    Set "Navigation Static" to true;
    Set "Generate OffMeshLinks" to true;
    Set "Navigation Area" to "City";
    Bake NavMesh -> Only the centre part of the cube shows the new Area colour and Area becomes unwalkable.

    The Nav Agents behave as if only the coloured inner part ("City") of the cube was unwalkable.

    Based on what I've read, these are the correct steps, but I cannot create a new area on my terrain. Can anyone help?
     
  2. Ben_Iyan

    Ben_Iyan

    Joined:
    May 13, 2016
    Posts:
    204
    I figured it out and thought I'd post my solution in case it can help anyone else.

    I had the "Agent Radius" on the Navigation->Bake tab set to 3. By increasing the value to 4 (also works with 3.5), I get the behaviour that I was looking for.
     
    kabage3000 likes this.