A* Pathfinding Project

Path detect door


Hi everyone,
I would like to use the Pathfinding in order to open automatically the doors that are present in my game (with a defined range). I mean, it would be great to don’t use colliders and to be able to detect the doors crossed by the AIPath.
Do you guys have an easy, optimized and well-suited solution ?
Best regards



So you want to just open all doors that are within some distance of the player?

The easiest answer is actually trigger colliders. The physics system is pretty well optimized (as in, it scales quite well). If you only have a single agent then just using a script that continuously checks the distance to the player would be more efficient however.


thank you for your answer, yes I use several agents. I would like to know if the path goes through the door, the collider is not enough for what I need. Currently, I use vectorPatch to retrieve the list, but the return path ignores the modifier ? i use funnel modifier


I found the solution, I use that :
https://arongranberg.com/astar/docs/callingpathfinding.html and linecast to check if a door is between 2 points