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

NavMesh Agent Max slope > 60 degrees

Discussion in 'Navigation' started by Ardinius, Apr 27, 2017.

  1. Ardinius

    Ardinius

    Joined:
    Oct 4, 2015
    Posts:
    57
    Hi,
    I need my agents to navigate over slopes greater then 60 degrees.
    I have found this editor scipt:

    [MenuItem ("NavMesh/Build With Slope 90")]
    public static void BuildSlope90 () {

    SerializedObject obj = new SerializedObject (NavMeshBuilder.navMeshSettingsObject);
    SerializedProperty prop = obj.FindProperty ("m_BuildSettings.agentSlope");
    prop.floatValue = 90.0f;
    obj.ApplyModifiedProperties ();
    NavMeshBuilder.BuildNavMesh ();
    }

    Which will allow the Max slope of the baked agent be 90, however i still can't get the agent types max slope to be over 60. How is this done?
    I generate a procedual mesh at run time, some of the angles on this mesh are greater then 60 and it needs to be navigatable.
     
    christougher likes this.
  2. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    I was also hoping to be able to increase the slope limit.