How to get/set area flags on Navmesh?

I was looking to use NavMesh to define different regions on the floor…lava, or wet, or making it only accessible to certain actors, and so on.

I found a very convenient “NavArea” class, and it seems like this would be a perfect use case. But…

  1. Is there any way to set “area flags” in the Blueprint version of a custom Nav Area, or do I have to create a C++ version?

  2. Once I set the area flags, how in the world do I get them? Just a boolean check to see if a point on the NavMesh has a certain flag or not.

Very little documentation out there on this stuff. Any ideas?

  1. Is there any way to set “area flags” in the Blueprint version of a custom Nav Area, or do I have to create a C++ version?

AreaFlags are accessible only in C++.

  1. Once I set the area flags, how in the world do I get them? Just a boolean check to see if a point on the NavMesh has a certain flag or not.

If you use ANavigationData.ProjectPoint to snap a location to navmesh you’ll get a FNavLocation back. It consists of a location and a NodeRef. You can then use that node ref as a parameter to ARecastNavmesh.GetPolyFlags call. This will give you both poly and the area flags.

Cheers,

–mieszko

Thank you!