[A* 2D] Obstacle Layer Mask didn't work for collider triggers

Considerring a 2D Hole mechanism, players and enemies could move over a hole tile, and they will “fall and hurt”. (or some spike trap mechanism)

My problem is: the Hole area shouldn’t be walkable for AI decision in my design, so I hope the Pathfinder component treat is as a wall, but it’s a trigger so Pathfinder still treat it as walkable.

I need your help.

Hi

Triggers will always be ignored, but you make it a regular collider and then put it in a different layer while adjusting the collision matrix in Unity. See Unity - Manual: Layer-based collision detection

but I need it allow player walking over it, and the trigger should detect player so that trap effect could be executed.
Or I have to add another layer which has exactly same boolean status as this Hole tilemap but has a regular collider in a different layer, which is dedicated for A* system.

Hi

Hmm, yeah, I think you’d need multiple colliders in that case, I’m afraid. Triggers are always ignored by the pathfinding package.