A* Pathfinding Project

Ignoring new layer


#1

I created a new layer and assigned some prefabs to it. I set it to not be hit by the scan in the Astar Path script. I scanned it but it still registers as an obstacle in the new navmesh. Is this is a bug or am I doing something wrong? Thanks


#2

Hi

Are you sure you removed it from both the collision testing and height testing layer masks?


#3

I’ve only seen the collision testing layer mask I think (the one immediately below the ‘Snap bounds to scene’ button). Where is the height mask? Thanks for the response


#4

Hi

Ah. You are using a recast graph, not a grid graph.
Then removing the layer from that mask should be enough.
Make sure you have not added any tags to the tag mask that the object uses.


#5

Also. Are you sure all relevant GameObject in that prefab are marked with that layer? Not just the root one.


#6

I applied the new layer to all of the child objects too and it seems to have worked! Thanks so much. By the way, is there a way to just re-scan one tile without me having to manually set the bounds? Like how it scans the whole map but just for the tile my player is in


#7

Hi

You don’t have to specify the exact bounds for the tile, the script will recalculate any tiles that the bounding box touches. So if you specify the bounding box for the region that you have changed that should be enough.