Search Unity

Can I find or calculate the weighted path distance for a NavMesh path?

Discussion in 'Navigation' started by mikejdavison, Mar 30, 2022.

  1. mikejdavison

    mikejdavison

    Joined:
    Aug 3, 2012
    Posts:
    4
    I would like to use the NavMesh to help an agent decide which goal to go for next. In this case, I would like to ask the NavMesh what the weighted distance is along a path - taking into account the different travel costs associated with different areas. Then I want the AI to take the cheapest route to the cheapest goal. Is there a way to ask CalculatePath for the weighted length?
     
  2. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    300