AI move to not working

Hi everyone I am trying to make my ai zombie move to a random point in the world but have run into an issue where when the ai is supposed to move it will not (Yes I do have a navmesh) please take a look at the screenshots below to see the issue any help is appreciated :slight_smile: also this is in the ai controller.

a few things to try.

first change the radius on the get random location to something larger so you can see if the character is actually moving and not just going back and forth in the same spot. i would set it to like 500 for testing or at minimum 100.

next are you spawning in your ai or are they placed in the level? if your spawning them then you may need to change the settings in the character. theres a option near where you set the controller that says something like assign ai controller then has a option that says placed in world, change that to spawned or placed in world. while your here make sure your using the right controller.

as a last thing i would add a print string to the on fail pin just to make sure that the rest is working and its not a case of the character just cant get to the location.

2 Likes

Hi thanks for the answer my ai will be spawned in the world but for now it’s just placed also I already have a print string and it is printing it but it isn’t moving, I just tried the changing radius and it didn’t help also the ai controller is the exact one that I am using, I do have 1 question though, could it have something to do with the nav mesh building navigation being at 4,044,980? anyway thank you for helping but unfortunately it still isn’t working :frowning:

the issue was actually the navmesh building navigation was too large so the zombie couldn’t move. do you have any ideas how to fix this?

if the nav mesh is still building then theres nothing for the ai to use for navigation. wait for the nav to be built and that should help things. though if your nav is that large you may want to look into a different solution like using smaller nav meshes or level streaming.

My case: I was using a static mesh inside the CapsuleComponent, which was bigger than the capsule itself, and it was causing some sort of collision issues. The actor would just spasm a little, but not move.
Solution: remove the collision on the mesh, or resize the mesh to fit inside the capsule component.

1 Like

I had the same issue for a few days and I just fixed it. If you’re interested the issue was that RecastNavMesh had Runtime.CanBeMainNavData turned off by default, when I turned it on the AI started to move again. I hope this will help anyone.

2 Likes

Omg, many thanks! solved my problem!

Cheers from 4 years in the future

4 years later, you solved my problem.
thanks !

[What I did]
Character Details Panel->Pawn tab->Auto Possess AI->Placed in World or Spawned(default:Placed in World)

6 Likes

Thanks a lot, it helped !

Yes, thank you!

1 Like

and you my friend, are a true hero!

Deleting the nav recast and remaking the nav mesh volume worked for me

Same here, tried to fix this for an hour, but all I had to do was to delete the recast navmesh…Thanks :slight_smile:

I tried all of the above.

  1. Delete navmeash, place new.
  2. Character Details Panel->Pawn tab->Auto Possess AI->Placed in World or Spawned(default:Placed in World)
  3. Runtime.CanBeMainNavData turned ON
  4. I have no collision on the mesh

But nothing helped. I must add that the second I spawn they do move. But once I die/respawn they won’t move anymore. I did notice that the second that I die they keep moving, but that stops after I’m ‘really’ death.

Anyone has an other way to maybe fix it?

Thanks in advance!