Best Practice for Varying Unit Sizes

Hi everyone,

I just bought this asset today and so far I am very happy with it. I am curious about best practices regarding what I’m trying to accomplish here. I’m focusing on the modifiers. I want my vehicles to simplify their path by taking jagged edges out when applicable. Is there a simple native modifier that can accomplish this on grid graph or would it be easier to just write my own?

Case A: Should take a “shortcut” between nodes when nothing is blocking it from doing so

Case B: (Native, no modifiers and working) No shortcuts when something is blocking it.

Thank you for your time!

CS

Hi

Yes, you can use the RaycastModifier with ‘Graph Raycasting’ enabled (and physics raycasting disabled). That will simplify the path a lot.

You can also use the funnel modifier. It is faster, but it works best on recast/navmesh graphs.

Take a look at this page for more info: https://arongranberg.com/astar/docs/modifiers2.html

Regardin varying unit sizes you may be interested in: https://arongranberg.com/astar/docs/multipleagenttypes.html

1 Like

Thank you Aron,

I’ve been experimenting with this more and I think the layered grid graph isn’t the right choice for my intentions. The modifiers cut the edges too close, so I am swapping over to the Recast Graph for now to see how that will do!

CS