Knock actor back set distance when hit?

You can use AddForce or LaunchActor on the impacted AI character, but those wont work if they’re under the influence of the MoveTo action.

If your AI actor is unable to use those, you can do a Trace, a Capsule, or sphere trace depending on the shape of the Enemy. Originate the trace from the Enemy location, and trace backwards along the vector away from the Attacker(you).

Trace the distance you want the Enemy to go backwards, if the trace hits something, then the Enemy can only go back that far. You then Lerp the enemy actor position from its current location to the Trace End/Hit location.

Hey all,

I’m re-making black belt to learn more in unreal (artist, not programmer, so gotta practice) ?t=20s

I’m looking for a way to knock the AI back a bit after they’re punched, similar to the video. What’s the best way to do this? (I’ve got punches done, I just need help knocking the AI back) I’m also wondering how to do this so whichever side they’re on, they fly away from the player.

Thanks in advance if you can help!

Thank you! Took some fiddling but I got it to work so far :slight_smile:

Hello, could you explain more or give me link about trace? I want my AI actor to knock backward. Thank you in advance.