Help, How can I know the destination can be reached?


#1

I used Source Mesh to do the navigation, i have a destination point, how can i know the destination can be reached?
i do not want to calculate the path, just want to know it can be reached.


#2

Is there any function to decide the target point is out of the source mesh?


#3

@aron_granberg help me!


#4

if someone know, please help me! ths.


#5

Hi

You can use PathUtilities.IsPathPossible.
See https://arongranberg.com/astar/docs/pathutilities.html#IsPathPossible


#6

@aron_granberg thank you for the reply!
AstarPath.active.GetNearest(point1, NNConstraint.Default).node;

this function always returns a node, now i need the function is that the point is not on the navmesh, it will return null.


#7

Can you help me to solve this problem.