Funnel modifier cutting corners

Hi,

I’m using the Funnel modifier on a path returned for a grid graph. However the modifier result seems to go outside of the walkable nodes slightly. Just enough that it cuts corners and makes the agent clip the egdes of obstacles.

I’ve attached an example of what I am seeing. The green lines are the actual (funnel) modified paths being returned. The blue lines are where I would expect the modifier to go i.e. to stay within the actual walkable nodes.

Is there any way to ensure the funnel modifier stays inside the walkable nodes?

NOTE: I tried using the raycast modifier which works well but is much to slow for very large paths.

Thanks

Hi

Sorry for the late response.
That is exactly the intended behaviour of the funnel modifier.
Grid nodes are represented as tiles. So what the funnel modifier does is that it allows movement on any part of that tile. Normally the paths go through the centers of the nodes, but with the funnel modifier, the path may go out to the edge of the nodes, which is what has happened in your case.

You should increase the Collision Testing -> Diameter setting on the grid graph or the erosion iterations.

Thanks for the reply.

I misunderstood where the center of the node actually was. It makes perfect sense now.