Search Unity

Wall walk with nav mesh link

Discussion in 'Navigation' started by castor76, Jul 27, 2017.

  1. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Ok, so I have created ground and wall with navmesh and then created link between them.
    The connection is definitely there as the agent do move in between, but I have several problems.

    1. When agent move up on the wall, it tends to move toward the either end of the link width and then traverse. Instead of trying to find the relatively reasonable shortest path toward the destination position on the wall, it seems to always go for the towards the edge of the width of the link.

    2. Once it has finished traversing the link itself, it orients itself on the wall. Which is fine, but it then turns towards left or right a lot and then after sometime, it rotates towards the actual destination point and then move on. It almost seems like he is drunken, as it lands on the wall , disorientated then after 1 sec or so it then tries to find its way. It seems like after the link traversal, it doesn't know which direction it needs to face, until it finds the path to the destination again.

    3. I also found that sometimes, the agent gets stuck after landing on the wall, way before the destination point. If I slightly change the destination point, it then moves again. This happens if there is no difference in between the destination point and agent's transform position along one of the axis. (say x axis) so if I change a lot of z axis distance between agent and destination, it doesn't move but if I make any slightest changes along the x axis, it then moves. Strange thing is that it actually rotates towards the destination, but it doesn't move. (stuck)

    Difficulty seems to be at knowing what rotation must the agent needs to be after coming off the link and trying to make the nav agent to not behave like it is drunken just after landing on the wall.

    Here is short video of it :

     
    Last edited: Jul 27, 2017
    DevinT7 and p0670083130 like this.