@Christougher
Nice! Great example.
There are a few ways to simplify it a bit though.
Here is some updated code
public NavMeshGraph graph;
public GameObject Planet;
public Vector3 planetCenter;
public int LandRadius;
public void SetNodes() {
graph = AstarPath.active.data.navmesh;
planetCenter = Planet.transform.position;
Vector3 tileV3;
graph.GetNodes(node => {
var nodePosition = (Vector3)node.position;
float dist = Vector3.Distance(planetCenter, nodePosition);
if (dist <= LandRadius) {
// node.Walkable = false;
node.Tag = 1;
} else {
//node.Walkable = true;
node.Tag = 0;
}
});
}