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

Can't figure out CalculatePath

Discussion in 'Navigation' started by kromblite, Dec 5, 2021.

  1. kromblite

    kromblite

    Joined:
    Mar 19, 2014
    Posts:
    72
    I'm using Navmesh.CalculatePath for the first time in order to check to see if a random spot on my navmesh is accessible to my navmesh agents. From the forums I've read, it sounds like it's only supposed to return as "true" if it calculates a path from point A to point B, but instead it just returns true every time. Does anyone know why that's the case, and how I can fix it?
     
  2. Daahrien

    Daahrien

    Joined:
    Dec 5, 2016
    Posts:
    100
    According to documentation, it also returns true if it finds a partial path. Which is weird.

    "bool True if either a complete or partial path is found. False otherwise."
     
  3. N7D

    N7D

    Joined:
    Feb 25, 2017
    Posts:
    9
    You can check if returned path is Partial or Complete.