Support Forum

Different pathing based on unit size

Is there something implemented already that handles making an agent that is 2 units wide take a different path when confronted with a 1 unit wide path, but allow 1 unit wide agents to go through it no problem? I’ve been messing around with it and cant seem to get it to work entirely. The closest I got was only preventing the unit from moving through by giving it a rigidbody2D and a 2D collider. I just wanted to make sure this wasn’t already a feature I am just unable to figure out instead of spending a bunch of time on it.

It’s! You can create 2 graph with different agent radius/height/etc and use it for bigger agent

2 Likes

See also https://arongranberg.com/astar/docs/multipleagenttypes.html