Search Unity

Baking simple MeshSurface fails

Discussion in 'Navigation' started by mapa17, May 20, 2019.

  1. mapa17

    mapa17

    Joined:
    Jan 27, 2019
    Posts:
    14
    Hello,

    I am trying to learn about Navigation, and have some problem, baking a simple NavMesh. (See scene)
    Containing a simple Cube floor and several obstacle objects. My problem is that for some objects there is no navmesh generated.

    Captura de pantalla 2019-05-20 a la(s) 22.42.01.png

    I want the agent to be able to walk on the floor and on the top of the obstacles.

    One of the obstacles for which no navmesh is generated is obstacle 8, although it is a copy of object 7 (for which a navmesh exists)

    Captura de pantalla 2019-05-20 a la(s) 22.45.02.png

    Captura de pantalla 2019-05-20 a la(s) 22.45.23.png
    Any ideas, about what could be wrong? I tried to include all info that might be useful.

    thx,
    Manuel
     
  2. Yandalf

    Yandalf

    Joined:
    Feb 11, 2014
    Posts:
    491
    Don't put obstacles on surfaces that you still want to be able to walk on. The fact that block 7 gets a generated surface is strange here, all the other blocks without a surface are the expected result.
     
  3. mapa17

    mapa17

    Joined:
    Jan 27, 2019
    Posts:
    14
    Hello Yandalf,

    thx for your reply, but I don't understand what you mean by I should not put obstacles on surfaces that i want to walk on. I mean that is what i want an obstacle to do, prevent the agent from walking on some parts of the map.

    In addition I want the agent to be able to walk on the top of the obstacles; for which no navmesh is generated.
     
  4. mapa17

    mapa17

    Joined:
    Jan 27, 2019
    Posts:
    14
    Hi,

    i think I do understand now what you have been referring to. So by obstacles you mean the "Nav Mesh Obstacle" component. So i should not put that component onto a scene element, because it will prevent any NavMeshSurface to generate a navmesh for that object and will curve out any nav mesh from any other surface. Is that correct?

    In addition I think I found out why my obstacles 7 and 8 don't get a nav mesh. This seems to be because of the minimum navmesh size setting during backing.

    Captura de pantalla 2019-05-21 a la(s) 13.55.14.png

    I don't understand why the 'backed' mesh has this setting, thought, because before backing I set the min region size to a very low value.

    Captura de pantalla 2019-05-21 a la(s) 13.55.30.png

    Am I missing something? How to i make the Bake settings take effect?

    thx,Manuel