Getting AI actor to move after spawning

I’m having an issue with getting an actor to start moving after it spawns. Basically, I want it to spawn under some event (temporarily on a button press for testing purposes) and then start following the player character. I can get it to spawn just fine, but it then won’t move (using Move to Actor) and stays in the idle animation. I have it’s velocity set to zero, but if I manually set a velocity to try and force it to move once it spawns, it just runs in place.

I’ve also set up a test case (bottom part of the screenshot) where I already have a version of the actor placed in the world manually. When I do it that way, the placed actor moves perfectly, but the spawning actor still only spawns.

Based on all of that, it leads me to believe that it’s some kind of collision issue or something is getting lost between “SpawnActor” and “GetController”. Maybe I’m missing a node, or have the wrong one? I am fairly new to this though so hopefully I’m not just doing something stupid on accident.


Of course not long after posting this I finally figured it out. Anyway, I took the “moving” part of the script out of the level BP and put it in my enemy class BP. Then I switched “SpawnActor” to “SpawnAIFromClass”, which also means I was able to take out the transform and just send the target location vector directly.

I think you need an AIController and BehaviourTree to make AI move, and you must have the NavMesh on your level also.

You don’t need the behaviorTree…for anything.

You can spawn from the LevelBP spawnAIFromClass was likely the fix here. Few checks and delays can help as well to make sure everything is parsed properly.