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
image.png
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:
image.png
Select all 5 animations, R click, create animmontage
image.png

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
image.png
Sample smoothing, weight speed change to 5 (for smooth transition between animations)
image.png

Go to ninja BP, viewport, character movement component, details → max walk speed reduce to 400
image.png

Create Animation Blueprint:

R click in content browser → Animation → AnimationBP, choose ninja skeleton, rename as ninjaABP
Open the ABP, create follow:
image.png
Open New state Machine tab, add state, name as Idlerun
image.png
Open Idelrun, type blendspace player ninja BS
image.png
→ promote to variable, turn on the eye icon at variable column
image.png
Go to Event Graph of ABP, create nodes as follow (set speed node from variable):
image.png
Open ninja BP, select Mesh component, choose Anim class as Ninja ABP_C
image.png

Trigger AI animation in game:

Go to its event graph, create an event trick node and make as follow:
image.png
in Place actors, Drag Nav Mesh Bound Volume in the scene, extend the space cover the whole venue (press P to visualize the area)
image.png


Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.