Migrating from AIPath to FollowerEntity gives wrong movement

  • A* version: 5.3.1
  • Unity version: 2022.3.55f1

Hello,
I’m trying to migrate my units to use the FollowerEntity (until now I was using AIPath), as according to the description it would solve some of my movement problems.

In my game I use a 2D grid type map, isometric with dimetric angle (I attach a screenshot with its configuration).

As for the units, I have tried to configure the FollowerEntity with the values I found equivalent to the ones I had in AIPath (which was working as intended), and I have removed the Seeker and the RVOController (I attach another screenshot with the configuration).

However, the units behave strangely, they make circles around the given destination instead of going to it (see video). I understand that I’m making some mistake in the configuration, but I haven’t been able to find it, could you help me to find what is wrong? I’m not using the AIDestinationSetter, I’m setting the destination by hand.
Video: https://drive.google.com/file/d/1Dii-V3cIh2HWtw13c8HI65UIhl9ZP_cU/view?usp=sharing

Thanks for the help.

Strange. Do you have any other components that could influence movement?

Try to disable local avoidance, just to rule things out.

Thanks for answering Aron.

I’ve disabled local avoidance and it was indeed the problem, now the agents get the expected behaviour.

I’ve checked my previous configuration with the RVOController and I believe it’s the same one I have now (the default one). Could there be a difference between the two cases? Screenshot of the previous config (the new one is in my first comment):

As for other components, I’m not seeing anything related, it has a BoxCollider 2D, but it was previouly working with it, and I’ve also followed the “Integration with physics” section of the docs.

Other than that, I do have one RVOSimulator in my scene, I didn’t touch it (its configuration is also present in one of the screenshots of my first comment).

I did some testin’ around on this one, and I wanted to note that using Isometric Grid caused my agent to move very erratically- not in the same way as posted here, but definitely not right. This was also “shoved” into a 3D scene so I don’t know if that’s relevant. Changing it back to Grid and the same settings for the agent and grid worked fine.

Just a note :+1:

1 Like

Hello again @aron_granberg @tealtxgr
I’ve managed to reproduce the error in one of the sample scenes, LocalAvoidance2D, and in my case I believe it’s exactly the same error as the one in my project.
I’ve changed the grid to a isometric grid with dimetric angle, and updated the size of the grid to match the scene. This is a video of the result: sample video.

As in my project, disabling local avoidance fixes the issue, or at least the situation improves greatly.

I’ve uploaded a copy of the project to drive so you could check it:
project copy

Thanks again.

Edit: Forgot to say it but I did test it with 5.3.2 (in my project, not in the sample scene). I saw some bugs where solved in it, but unfortunately the error keeps happening.

1 Like

I opened the video and project and, forgetting about the jittery movement thing, was like “I don’t get it what’s the problem, they just move like cute little jittery creatures in this-- oh right, they’re not supposed to be…”

Can confirm here as well :+1: Also tested in 6000.0.34f1 and it’s still present. I also tested in 5.3.2 :saluting_face: @aron_granberg

1 Like

Just to add some more information for when this is reviewed, I have noticed that although disabling local avoidance greatly reduces the problem, it is still present. The movement of agents still has the same effect on some paths, just to a lesser extent. I have also noticed that the reachedDestination is only working correctly some of the time, while other times it does not return true at all, even if the agent is over the specified position. I don’t know if this is related but I’m commenting it too.

Thanks.

1 Like