Adding Obstacles (Spherical Beta)

Is it possible to add obstacles at runtime with the Spherical Beta (Since it doesn’t support NavMeshCut or Regraph) or is the only way to create unwalkable areas to manually change a mesh before runtime?

Thank you very much!

Hi

For spherical navmeshes the only way is unfortunately to change nodes to be unwalkable/walkable or replace the whole mesh. Navmesh cutting or scanning a spherical world using a recast graph cannot be done because both of those techniques require a well defined up direction.

I am hitting the same Problem.

Can you give me a hint on how I can manually change the nodes close to an obstacle?

  AstarPath.active.AddWorkItem(new AstarWorkItem(ctx =>
        {
            var gg = AstarPath.active.data.navmesh;
            gg.GetNodes(UpateNode);
        }));

This allows me to update the node, but how do find the relevant nodes overlapping with an obstacle?
the node.position returns a value I don´t understand: e.g. position: ( -712, -47757, 14634)

I got it working using the GraphUpdateScene component.

1 Like