Seeker's Start End Modifier (Add Points) makes the Funnel Modifier stop working

Hello,
I want my characters to end their path at the original target point. I’m using a recast graph and standard seeker script. I’m using funnel and smooth modifiers to make the paths look natural.

Everything works great when “Add points” checkbox is unchecked in the seeker script. However, as soon as I check it, the funnel modifier is ignored and the path changes from a nice straight line into a squiggly nightmare.

Is this an expected behavior? How can I keep the funnel modifier working with added original end point?

EDIT: Right now I’m simply adding the target point at the end of found vector path. However, this results in a single sharp turn and/or some backtracking needed to reach the target position from the found end point.

That’s odd.

Which version are you using? Are you perhaps trying to use the funnel modifier in a 2D game (XY plane)?

Nope, I’m using it in 3d enviorment. According to changelog it’s version 3.8.8.1

I’m including a gif demonstrating the behaviour in playmode. I made the character stuck behind door for easy demonstration of calculated path changes. The path is recalculated every second. Same effect no matter if I change the checkbox during playmode or in edit mode.

Ah. I see why.

The funnel modifier is supposed to be the modifier that was applied right at the start (only after the start end modifier). Previously it was possible to change the order by the user and to prevent errors (e.g if the simple smooth modifier ran before the funnel modifier) the funnel modifier would bail out if it detected that the path.vectorPath list has a different length than the path.path list. If you set the start end modifier to ‘Add Points’ it will add 2 extra points to the path and thus the funnel modifier will bail out and simply not do anything.

I will fix this bug in the next version.
Since the funnel modifier only cares about the position of the first and last points in the vectorPath list it should not matter in theory if you have ‘Add Points’ enabled or not. So as a workaround, simply make sure that ‘Add Points’ is disabled.

Thank you. After some investigation I found out that I actually tried to move the character to a point that was outside of the generated recast graph - that’s why the path didn’t end at the exact point. I adjusted the settings a little bit so the final point lays inside the graph and now the path ends exactly where it should with no need of checking the “Add points” checkbox.

I’m happy that I found and reported a little bug though :slight_smile:

Ok.

I would recommend the ‘Exact Start Point’ and ‘Exact End Point’ fields to use the default value (ClosestOnNode) if you haven’t already changed them back. (you can also skip ‘Use Raycasting’ and ‘Use Graph Raycasting’ in that case since it will not make a difference since the point is on the graph already).

Yup. Thanks for that. I will credit you in the changelog.