Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Agent is going through the wall set as not walkable

Discussion in 'Navigation' started by M-A-N, Jul 7, 2022.

  1. M-A-N

    M-A-N

    Joined:
    Aug 16, 2013
    Posts:
    14
    I have attached a NavMeshAgent to my fox model. It follows as expected the mouse (controlled by the user). But there is a problem, the agent sometimes (after recomputing the path I think) collides the wall obstacle set as not walkable.

    It's possible to see the problem on this video:


    At the end of the video, it's possible to see that the obstacle is debugged as not walkable as expected.

    Any idea to fix this?
     
    Last edited: Jul 7, 2022
  2. Inxentas

    Inxentas

    Joined:
    Jan 15, 2020
    Posts:
    277
    I think you're misinterpreting what happens here. I didn't look at this frame-by-frame but I think you agent's radius is simply a bit too small for the lion. I can't tell for sure but it looks like your lion's head / bum sticks out of the radius, which causes them to clip with other objects. What happens when you double the radius of the lion?
     
    M-A-N likes this.
  3. M-A-N

    M-A-N

    Joined:
    Aug 16, 2013
    Posts:
    14
    Thanks a lot, this fixes the problem!
     
  4. Inxentas

    Inxentas

    Joined:
    Jan 15, 2020
    Posts:
    277
    Glad I was able to help. Good luck with your project! ;)
     
  5. Kivi97

    Kivi97

    Joined:
    Jul 28, 2022
    Posts:
    2
  6. Inxentas

    Inxentas

    Joined:
    Jan 15, 2020
    Posts:
    277
    My oh my, EA resorts to spamming the Unity Forum these days?

    This is a new low, even for thát company.