- Home /
Is there any way to find out if a specific position is on the navmesh?
so i'm doing stuff with pathing. I'd like to know, is there any quick way to check if a specific location is either on the navmesh, or floating within a certain distance above it (ie, within its horizontal boundaries)
I know i can path to invalid locations, and the path will just stop at the closest point, but i don't want to do that. for one, path calculations often take several frames. I'd like to just drop/ignore orders to invalid locations, instead of going to near them.
Answer by William_Lee_Sims · Jun 13, 2015 at 07:02 PM
You can call the SamplePosition function in NavMesh with the position and a maximum distance. It returns false if there isn't a NavMesh point within that range.
Your answer
Follow this Question
Related Questions
How do I limit the path of a NavMeshAgent? 0 Answers
How can I tell when a navmeshagent has reached its destination? 10 Answers
Navmesh Pathing: Is there any way to loosen the path? 0 Answers
Finding Closest Object Through Navmesh,Identifying Which Object Is Closest on NavMesh 0 Answers
Instantiated objects at beginning of runtime are messing with the pathing for my NavMesh. 0 Answers