Grid graph with obstacles - scan works incorrectly

Hi,
I have se up a grid graph on hex tiles. But when I make a scan the obstacles themselves are missed out and are walkable. This is if I choose the circle colider type. If I choose point, the whole area is walkable. The screenshots might help.

Tx

V

image

OK, I found the solution here How do I integrate A* with 2D Toolkit's Tilemaps? - #7 by Argaen. I had to change the composite cillider to polygons.

1 Like

Hey so, I have no idea what happened but this started happening again. I even removed the composite collider and put it back again. I have no idea what could be wrong. The issue persists as described above. Tx for help

Hmm, I have no idea what could cause it to come back like that. It is set to the polygons mode now, isn’t it?

Well even if I remove the composite collider it behaves like this. Maybe i should mention that I recalculate the obstacles in runtime. But im not sure if it matters. Whatever I do, if I change it to circle collider it works (with the unintended effect…logically). Maybe I can provide the project to you (its a hobby project).

Hey any idea where to dig now? What do you mean polygons mode? Is it the AStar setting or do you mean the colliders?

I meant the composite collider mode.

You can send the project to me if you want, and I can take a look.

Finally solved it. The issues was that all the tiles that I marked as obstacles had only an outlined image in them. Unity then did not make the whole tile inaccessible and A* took them as accessible. Well not sure if this is fixable on A* end - dont think so. For anyone out there - peace! Happy to have it done:)

1 Like