Create Enemy Mesh:
Download character (Ninja) package (with mesh, animations, texture), create folder name Enemy
Copy 3rd person BP into Enemy folder, rename as Ninja_BP
→ open BP, replace sketeal mesh to ninja mesh, delete Cameraboom and follow camera in component
Drag ninja BP character in the scene
To avoid clipping on enemy when character get closes to him:
Open ninja BP, Capsule Component → details → Collison preset: Custom → tick Ignore Camera in Collision
Repeat the same on CharacterMesh Component
Create enemy blendspace1D:
Drag all animations fbx to UE, untick import Mesh, choose the ninja skeleton imported earlier, click reset to default, then import all
Rename the animations as follow:
Select all 5 animations, R click, create animmontage
R click in Content broswer → animation, blendspace1D → select ninja skeleton, name as Ninja_BS
Open the BS, drag anim Idle, walk and Run from start, middle and end point
Change horizontal Axis Name to Speed, max axis value to 400
Sample smoothing, weight speed change to 5 (for smooth transition between animations)
Go to ninja BP, viewport, character movement component, details → max walk speed reduce to 400
Create Animation Blueprint:
R click in content browser → Animation → AnimationBP, choose ninja skeleton, rename as ninjaABP
Open the ABP, create follow:
Open New state Machine tab, add state, name as Idlerun
Open Idelrun, type blendspace player ninja BS
→ promote to variable, turn on the eye icon at variable column
Go to Event Graph of ABP, create nodes as follow (set speed node from variable):
Open ninja BP, select Mesh component, choose Anim class as Ninja ABP_C
Trigger AI animation in game:
Go to its event graph, create an event trick node and make as follow:
in Place actors, Drag Nav Mesh Bound Volume in the scene, extend the space cover the whole venue (press P to visualize the area)