Movement Without NavMesh? On Target AIPerception Not Triggering?

I am trying to move an actor in 3D space so NavMeshes don’t really work. I wanted to try messing with Behavior Trees so I copied everything from this tutorial, Behavior Tree Quick Start Guide | Unreal Engine Documentation, except I replaced MoveTo with MoveDirectlyToward and just generated a patrol vector with random floats. MoveDirectlyToward wouldn’t move my actor so I tried creating a custom task with MoveToLocation with pathfinding disabled, but that also didn’t work. I am not sure what I am doing wrong.

Also, the On Target AIPerception Event is never triggered. Could someone also help me with this?


Here is the image of the custom task blueprint I also tried, but it doesnt seem to work. Move To Location or Actor seems to work fine with these settings in the blueprint of the pawn actor, but I don’t know why I can’t move them with a custom task.

Are you placing the pawn manually in the level or spawning it? There is an option on the Class Defaults to set the Pawn to be auto possesed. Check if you have it as in the picture below.

autopossess.png

Also, where is the Perception component placed? On the AIController or inside the pawn?

Acceptance radius is negative 1. Not sure that is going to work (It might, like I said, not sure).

For anyone that is wondering, it turns out I just had to set the blackboard key variable (PatrolLocation) to editable

1 Like