Jerking movement?

The simple smooth component doesn’t seem to do anything to help my unit from jerking into place:

I’m using verbatim the sample code from the tutorial for movement.

I tried adjusting the Next Waypoint Distance value and it creates even stranger results.

Thoughts?

Hi

Path requests are asynchronous, so when the movement script recalculates its path it may take one or two frames for the result to come back. During this time the agent may have moved a small distance. In your case I would have expected that the ‘Next Waypoint Distance’ is set to a too low value so that this very small distance that it moved, was so far that it thinks it has to turn around and go back to the start of the path when a new result is available.

The included movement scripts (AIPath/AILerp) have more sophisticated methods of preventing this issue from happening though, so you may want to use those.