Jitter, unable to reach target

Using PathfindingProject_Pro_WebsiteDownload_4_2_4_75066e20.zip
Reporting two separate bugs, both shown in video

There are no other pathfinding relevant scripts other than what is shown in the video

Bug 1, prior version 4.1.21 (2018-08-09) did not have this problem
Jitter, as shown. I tried various things to fix it and turning off other scripts. Disabling AIPath fixes the problem (but no longer moves of course)

Bug 2: Unit circles destination, cannot reach the target
This was reported about 6 months ago, by private message, and still exists. I’m able to fix this by editing AIPath myself, I would prefer not to have to modify the code every version update, and besides this is a default bug with A* Pathfinding Project that shouldn’t exist in my opinion.

Hi

  1. Huh, I haven’t seen that kind of jitter before. It’s interesting because the AIPath script barely changed between 4.1.21 and 4.2.4, so I’m not sure what could have caused that. Would it be possible for you to share an example project with me that shows this issue.

  2. Ah, right. I should try to experiment with that code that you sent me. I had forgotten about that. I think you should be able to work around it in this case by either increasing the rotation speed or the slowdown distance, but the code could probably handle this in a nicer way.

It’s hard for me to pull out these specific things into a separate project because a lot of it is dynamically generated from code.

As an update, I turned off the code in AIBase and my own code that could possibly move the character and noticed he was still moving! So I tried turning off “Apply Root Motion” on the Animator and the problem stopped, including after I reenabled the movement code.

However, I need root motion and the old version worked fine with root motion enabled. So it might be a conflict between root motion and AIPath?

I figured it out. I tried to use aiPath.velocity instead of velocity2D to get the current velocity of the character, which I used to determine what animation to play. Can velocity2D be made public?

Hi

Ah, yeah that might cause issues. The magnitude of .velocity can be quite noisy as it includes gravity. Getting velocity2D from the velocity is pretty simple as you would just exclude the y coordinate ( new Vector2(velocity.x, velocity.z)).