Different layer mask rules for different seekers

Hi! Firstly, awesome pathfinding project, very thanks.

Imagine a room with doors. In the room we have zombies and ghosts. The ghosts should be able to move through the doors while the zombies should not. (No one can move through walls) So i can use 2 different Obstacle Layer Masks in my Astar Path script, but how do i specify on the different monsters (seekers) what layer mask rules they must follow?

Thanks for reply!

EDIT: Just found out about tags, but how do i set a tag with code? i spawn instantiate objects in game and i want to set a tag to them on the fly thanks

Hi

The easiest if you want completely different rules for your agents is to follow the tutorial here: https://arongranberg.com/astar/docs/multipleagenttypes.html

You can also use tags and set them using code, see https://arongranberg.com/astar/docs/graph-updates.php. This uses a bit less memory.