Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

New Navmesh Link example

Discussion in 'AI & Navigation Previews' started by LiefLayer, May 20, 2017.

  1. LiefLayer

    LiefLayer

    Joined:
    Jan 6, 2013
    Posts:
    65
    Hello,
    I need an example to use the new navmesh link to connect two navmesh surface component (both set to children).
    I tried to link my plane ("terrain" withouth the terrain component) with a 30° plane, but it is really difficult to understand how to do it.
    1. There is no way to do an automatic connection between two navmesh surface component... I tried my best to connect them manually but I really don't know if my link was right.
    2. After I position the link my character seem to ignore it.

    Maybe there is also a new navmesh agent... or maybe there is an example that it's not on git... I really don't know.
    Still I think this new system it's the best for my game and I would like to use it.
    I think that a basic example would be enough to understand what I do wrong, but if you know a tutorial for the new navmesh system I would really like to take a look to it.

    An example of the navmesh modifier would also be great, since I really don't know how to modify the navmesh surface component with it.

    Finally I really would like to know if it's possible to fall from a surface component to another surface component with the navmesh link... I know that to jump I need to deactivate the navmesh agent component and reactivate it after the jump... but to fall?

    Thank you in advance
     
  2. LiefLayer

    LiefLayer

    Joined:
    Jan 6, 2013
    Posts:
    65
    In the end I used the local navmesh builder/navmesh source tag, and I used a wall trigger to deactivate the navmesh agent, make my character jump, and reactivate it after the jump animation.
    I was able to make a point&click system with no fall problem this way.
     
  3. LiefLayer

    LiefLayer

    Joined:
    Jan 6, 2013
    Posts:
    65
    Finally I understand why my navmesh link didn't work. You actually need to use the destination of the navmesh agent to use navmesh link... If you want to move your character with your personal script you can still use navmesh link but you need to set a destination in your navmesh agent.
    You need to do each connection manually, but it works.
     
  4. kimyukyeong

    kimyukyeong

    Joined:
    Mar 24, 2018
    Posts:
    1
    Hi, are you still here in unity forum?
    my agent cannot pass over the link (two surfaces connected with navmeshlink, navmesh built very well with blue colors-looks connected very well-, but agent can not walk through it, should i set destination for the agent? (my agent controlled by scripts, its player not AI) if i set destination, player not controlled by key.

    Never mind, i changed NavMeshSurface component, set Collect objects to "All" then it works.
    if somebody struggles.
     
    Last edited: Jan 23, 2019