So I am trying to create a simple AI controller on a Pawn I created called TestBox. The only thing in the textBox is a static mesh box which is set to movable.
I am trying to follow this tutorial, Unreal Engine 4 Tutorial - Basic AI Navigation - YouTube and have gotten to this part,
where in the level blueprint, I hit F and it should move to a TargetPoint which I dragged into the scene.
However, when I PIE, and hit F, nothing happens and I get this error
Does anyone know why this is happening? I’m pretty sure it has to do with me trying to move a box pawn and not a character, but I need to be able to move solid objects like this box through AI in my game.
Well, you do need a movement component to be able to move I recommend CharacterMovementComponent, since it has a number of additional features, but you’d need your box to be of Character type. PawnMovementComponent should work as well.
So I got my main scene somewhat working, by creating character driver blueprints which the pawns are parented under in the editor. This way the drivers move to where I need them to, albeit with clipping problems. What I am using this for is moving the floating islands below next to each other. However, while the drivers move, because the static meshes of the pawns are so far above the nav mesh, that their boundaries are not reflected in the navmesh, so the driver characters don’t see the edges of other islands, causing clipping when the drivers get too close.
But I think I can get around this by using behavior trees, making the Drivers always keep a minimum distance and avoid each other. Just have to learn how to use behavior trees first.