Wrong Graph generation with composite collider

So, as you can see in this video:

If I have a Composite collider in my tilemap, the graph generation is wrong. It works if I remove it tho.
Is it a bug?

It seems that if you use Outlines in the Composite Collider 2D it won’t work.
It does work however if it’s on polygons.

Maybe a bug?

image

Hi

This is working as expected, even though it is perhaps not intuitive. When Unity generates an Outline collider, the graph literally cannot detect that the space inside the collider is occupied. The physics engine does not have this information. You must use a polygon collider for the physics engine to be able to know if a point is inside the collider. Otherwise it only tracks the edges of the collider, which is not enough for graph generation purposes.

1 Like

It makes sense. Thanks for the explanation!