Search Unity

Navmesh path issue with platforms

Discussion in 'Navigation' started by mostlyhuman, Nov 23, 2018.

  1. mostlyhuman

    mostlyhuman

    Joined:
    Mar 16, 2013
    Posts:
    53
    I have a ground terrain with stairs that lead up to a platform, I am using the component workflow and the terrain, stairs and platform have a navmesh component. I have a simple test setup for the agent to follow the player around but if the platform navmesh is enabled on start the agent does not move, however if i disable the platform navmesh the agent will work as intended on the terrain and on the stairs, no idea why the platform is causing it to wig out. Any ideas? navMesh.jpg
     
  2. Yandalf

    Yandalf

    Joined:
    Feb 11, 2014
    Posts:
    491
    That's incredibly strange. What does the agent do if you disable the platform on start and then enable it while the agent follows? Also, are you certain you aren't somehow forcing the NavMesh to be continuously rebuilt via that platform?
    Please provide as much info as possible on your setup, with what you're showing here you shouldn't have any problems.
     
  3. mostlyhuman

    mostlyhuman

    Joined:
    Mar 16, 2013
    Posts:
    53
    I isolated the issue and it sure does seem like a bug. My player geometry is childed under the main Player object, the top level object has the main colliders, scripts and animation controller etc. If I add a collider to the child object the issue will resolve, but if the child object has no collider then the strange platform issue restricting movement on the agent will occur. I have no idea why this is, why a collider on the player would affect the agent being able to calculate its path and move. The only AI/Navmesh command I am using is SetDestination and the destination is set to the parent Player object's position.