Recast Graph in 2D giving me zig-zag path?

I’m testing the recast graph in 2D. It’s giving me a path like this.
It seems like between each triangle, it wants to go to the center. Why is it like this and how should i set it up so it would walk straight to the target instead of this zig zag path?

Thanks! :slight_smile:

Hi

You can attach the FunnelModifier to simplify the path.

Thanks a lot, that worked like a charm!

I have another question related to this, not sure if should start a new thread? If some bigger creatures have bigger colliders than the player, how do i prevent them from trying to go into smaller spaces and getting stuck, since the characterRadius seems to be the same for all.

Check out Multiple agent types - A* Pathfinding Project

Great, thanks. But is there a way to copy all settings from one graph to another? :slight_smile:

Currently, not in the inspector. Using code, it’s possible to save it to bytes and then load it additively.

Hey @aron_granberg

I using Recast Navmesh and AIPath with Funnel Modifier and my Agent always moves into Navmesh cut region like the image. Do you know how to avoid this ?
image
image

Hi

What is your agent’s pick next waypoint distance? Maybe it’s too high and that causes corner cutting?

Hi @aron_granberg

You’re right, I tried to reduce that value and it is working great now! Thank you!

1 Like