Dynamicgrid obstacle not working

Hi, ive added the dynamic grid obstacle script to my gameobject but it is not updating the graph. Is there something else I need?

Hi

Sorry for the late reply, I’ve been sick these last few weeks.
Does your gameobject have a collider? If you scan the graph manually during runtime from the inspector, does the obstacle show up in the graph?

Hi,

No problem hope you are feeling better.
It does have a collider yes and when I scan, none of the obstacles show up.

Hi

Then it sounds like you need to change your grid graph settings. The DynamicGridObstacle component recalculates the region around it from scratch as if the graph had just been scanned. The collider still needs to be configured in the grid graph settings to be an obstacle (or ground if that’s what you want).

Ahh i see that enabling obstacle layer mask layers creates obstacles, but now they appear to be really big for some reason. Does it use the box collider or the model?

here is a screenshot of what is happening.

oh wait, changing the diameter has fixed it.

1 Like