Import the anim in UE, choose old UE4 mannequin as skeleton
Create punch anim:
R click on imported anim → retarget anim asset → duplicate and retarget anim asset
Choose the new UE5 mannequin → Retarget
Rename the new retarget anim as UE5 anim
R click on new anim, create montage anim
Go to 3rd person BP event graph, add custom event:
Go to UE5 one anim, check the frame where character finishes punch and start be punched, remove those frames afterward
Go to anim montage, drag the clip below just after the default clip, to reset the duration
Create line trace for Attack enemy target:
Go to 3rd person BP, viewport, add 2 arrows components, name as start and end attack
move their arrow positions as below:
To event graph:
The attack system is done.
Make a dummy as enemy to attack:
Create a BP chararcter, name as dummy
Add the mesh (he used ue4 mannequin) in its viewport,
Collision preset: Block all
To event, add health variable and set graph below:
If health > 0, will receive damage; if not true, will destroy actor
Set health default value as 10
Back to 3rd person BP graph, add:
Set Base Damage value as 2
Drag the dummy in scene, try to attack and destroy
Bug fixing (jigging found after clicking attack frequently shortly):
to 3rd person BP, add Boolean Can Attack (set as true in default value)
add Set and Get nodes respectively as follow:
Add delay node at end and connect to return value:
Ending set can attack node as true too (for continuous attack):