This video takes the enemy AI we developed in the last Unreal Engine 5 to chase our player around the screen, and animates the characters that we used.
In later tutorials we will add health, damage, user interface, and more.
This tutorial is made in 5.03, but should also work on the latest UE5 builds.
#artificialintelligence #ue5 #tutorial
Adding a written list of all the commands used in this tutorial:
In Animations- AI- create BlendSpace1D of Type SK_Mannequin
Name IdleWalkRunEnemyAI and Open
Horizontal Axis- Name- Set as Speed
Axis Setting- Horizontal Axis Maximum Speed 600
Drag MF_Idle to the start of the timeline
Drag MF_Walk to the middle of the timeline
Drag MF_Run to the end of the timeline.
Content Browser- Create Animation Blueprint of Type SK_Mannequin
Rename AP_EnemyAI
Open it
Drag IdleWalkRunEnemyAI into the scene
Connect to Output pose
Drag Speed off set Variable
Go to Event Graph
Drag off return value for Try Get Pawn Owner- Cast to BP_EnemyAI
Drag off As BP_enemyAI- Get Character Movement
Get velocity
Vector length
Set Speed
Return of vector length to Speed
Pin Event Blueprint Update to Cast to BP_enemyAI
Pin to Set Speed
Open BP_enemyAI
Viewport select Mesh
Details- Anim Class- AP_EnemyAI
Change speed of character
Character Movement- character movement walking max walk speed normally 600
And/or change acceleration