Procedural map, using gridgraph, having problems with collision testing

For the sake of the example, assume that I have to add everything by code, and not through the editor.

When I change the gridgraph.collison.diameter, and collision type, through code, nothing updates, when I do Astarpath.data.scan();
Changing other values, like thick raycasting, etc, do have effect, so I need a way to be able to change the collider type and it’s diameter, at runtime.

That’s odd. It should have an effect. It’s the exact same parameter that the editor modifies.
Cold you show me the code that you use for this?

Sure, here.

It’s a great asset, it’s just this one thing I need for my project. Even after changing collision.type, diameter, etc, it still calculates the path in between cubes where there’s maybe 2 meters space.

I even checked with the provided procedural scene, and changing the diameter at runtime doesn’t update it for some reason. I’m using the newest stable version.

Also, here how it looks at runtime, and the proof that it’s actually set to the desired diameter:

Hi

It looks like you haven’t set a layer mask. The collision testing code will only detect obstacles that are included in the GraphCollision.mask field.

1 Like

Thanks, now it works correctly.