Squiggly line path

Hi there.
I am using the free pathfinding project on my own project with great results. Everything is easy to use and straigthforward and the documentation is top notch!

The only difficulty I’m having is in certain directions the pathfinding algorithm doesn’t present a straight line but instead does a squiggly line, making the units “dance” around (i can make a video if needed).
What can I change for this to make straight lines like usually does (happens 50% of the time) ? Already tried bezier curves, increasing the distancetowaypoint, collider diameter, etc.

Here is a picture of the weird result: http://imgur.com/a/ncLmo

Hi

That looks like you are using the OffsetSimple smoothing mode for the SimpleSmoothModifier. Like the documentation mentions, if the offset value is too high, you may get results like that. You can reduce that value or you can try using some other smoothing mode. Usually I would recommend one of the other ones since they do not have this problem.

Hello Aron, thanks for the quick reply.
Actually no, i was using Bezier (subdivisions 3, Tangent 0.4). Never ever used the offsetsimple.
I’ve also tried with Simple but the result is similar: http://imgur.com/a/aM4WR
Also, disabling the SSModifier: http://imgur.com/a/4hvk0 As you can see, only in certain directions does it do the squiggly line.

More info:
Unity 5.5.1f1 64bit
My Ground is Terrain
Followed the tutorial on creating the A* objects and everything went fine

Ah. It looks like you may have set the Grid Graph -> Neighbours setting to Four instead of the default which is Eight. This will prevent the path from going along diagonals.

Its set to 8 already. Sorry.
Do you want to look at something?

Do you think you can post a screenshot of your graph settings as well as a (somewhat high res) screenshot of your graph?

Sure!

Here you go.

Ok. So it looks like it is following the grid exactly as it should. You can add a modifier to simplify the resulting path.
Try either the Raycast Simplifier or the Funnel Modifier (both at the same time also works).

Adding the Raycast Simplifier solved it. Thanks a lot!
Now just have to tweak the speed because suddenly the unit travels almost instantly (but along the simple path).

Thank you very much for your time!