The pathfinding doesnt seem to stick to the navmesh

Hi guys, I’ve recently started using this project and I would like to know why the path doesn’t stick to the navmesh.

As you can see in the image, the path being drawn doesn’t adhere to the navmesh but instead seems to be floating in the air. This navmesh was manually created in blender. I am moving the agent by generating a path and then simply moving it using a rigid body. The only time I can get the agent to stick to the surface is when the 2D rigid body has a very high gravity scale. This, of course, isn’t the best solution because it causes a lot of force to be used to make the character jump.

This problem doesn’t occur when the target position is generally close to the agent such as when it is chasing the nearby player. Can you please offer some assistance.

Hi

The funnel modifier (which I’m guessing you are using) discards points that does not change the path when seen from above by default. You can make it stick to the navmesh by enabling the ‘Split at every portal’ option.

Thanks for the speedy reply. I honestly wasn’t expecting it.
I wasn’t using the funnel modifier at first but after your reply i did and enabled the specified settings and it works, thanks.

1 Like