Measuring distance Player to Mouseposition

I wanted for my clickttomovescript to Display the Player how far he ist moving when he clicks on a Position.
It should bei displayed in realtime, not whe. He already clicked Like Pathdistance will be 5.00m

How do i do this?

With Vector3.Distance

But this is the direct distance, ignoring Objects, right? Not the actual pathlength of the navmesh asexample.

You might want to check this thread:

1 Like

Navmesh gives you a path as array of vectors. Apply this function to all consequent pairs of points in the path and sum.

1 Like

Thanks guys, looking into it!