Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question NavMeshQuery to path cost?

Discussion in 'AI & Navigation Previews' started by TP-Fab, Aug 29, 2023.

  1. TP-Fab


    Jul 10, 2019
    Hi there,

    I recently started using NavMeshQuery for path calculation in Burst context. I've been able to create, update and end a path properly and get the full path thanks to the PathUtils shared by @Abbrew .

    I'm able to get all NavMeshLocation from there, and I know the NavMeshQuery pathing methods use the projects' default costs to get the best path, but I haven't been able to find the cost of that path. The only way I see at the moment is via a series of position sampling along the path, but that's far from optimal :(

    Does anyone have a clue?