I have 2 gameobjects snake and bat. I want bat to walk through block. For this, I added a new physics 2d collision layer which ignores the block and added it to bat so that bat can go through block. The issue is in grid graph, the block is unwalkable for all objects. Can I make the block walkable for a specific gameobject or layer?
Hi
There are many different solutions to this:
In order of increasing complexity:
- (least complex) You can use another graph: see https://arongranberg.com/astar/docs/multipleagenttypes.html
- You can use tags: see https://arongranberg.com/astar/docs/tags.php
- You can use an ITraversalProvider: see https://arongranberg.com/astar/docs/turnbased.html#ITraversalProvider
1 Like
Thank you Aron! I solved my problem with creating each graph twice (one for flying, one for walking unit) then changing seeker graphs for units in code. Thanks for the help