AI Strafe/Dodging?

Hello, I am trying to find a way to make an AI strafe/dodge without a behavior tree; I need the AI to be smart and literally dodge bullets. If I can have some blueprint help that would be great! Thanks!
-CB

I never did any AI yet, but maybe I can help by asking clarifying questions.

Do you want the AI to dodge bullets coming at him from the player while still running toward the player, just strafing as he goes?

Unreal Tournament (every version) does this. They can even dodge rockets while trying to reach a powerup while trying to keep you where they can continue to shoot at you.
You might be able to find out how it’s done by studying the open source Unreal Tournament 4 project, though I’m not sure if they have AI implemented to the extent in that version as they do in the previous commercial versions.

You need to have an AIController that, by using AIPerception, or some other mechanism, detects the bullets and then triggers an AIMoveTo to a position on the left (or right) of the possessed pawn.

This is part of whole ai tutorial, imo best for people starting with ai in UE Creating AI in UE4 Part 12 - Strafing behaviour - YouTube

Here you have strafe, I suggest try whole tutorial, not my.

I managed to get it working this way

1 Like