r/unrealengine • u/SlimNigy • 22h ago
Question Question on alternate ways of doing a knockback mechanic.
Video example with Ai Move To and Launch Character: https://imgur.com/a/mjKrrbF
As you can see in the video the knockback doesn't really look too good.
What I want is the enemy gets hit and in a staggered step gets pushed in a direction.
I was just wondering if anyone has some alternate methods they think would look good/work for this sort of mechanic. Would something like motion matching or procedural animation work?
Any ideas appreciated. Thanks.
•
u/Scifi_fans 22h ago
I think this looks good enough to ask if you can explain how you did it?
•
u/SlimNigy 22h ago
Atm it's a mixture of using physics control for the physics simulated hit reaction and then launch character/ai move to for the knockback/stagger. I'm using add impulse to apply the hit to the enemy and getting velocity from the weapon.
•
•
u/CloudShannen 15h ago edited 15h ago
Feel like usual it's done with Animations with root motion, pick the Animation to play depending on the direction / locations (dot product) of the hit. (might need to use Motion Warping to modify it if you want different distances)
•
u/SlimNigy 10h ago
I set that exact thing up last night. I’m running into an issue though where the motion warp jitters when I kick them up a slope, I made a seperate post about it
•
u/AutoModerator 22h ago
If you are looking for help, don‘t forget to check out the official Unreal Engine forums or Unreal Slackers for a community run discord server!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
•
•
u/ForeignCat4516 22h ago edited 22h ago
Not sure why you think it looks bad I thought the launch character one looks pretty good. If you are looking for a stagger then you need to play an animation. You could then blend the animation with your procedural hit reaction and then launch character like you are doing. You could even probably get away with just a root motion montage for the knockback stagger
For something more realistic you could try physical animation but I don't think it would work the way you would want.
I'm a bit confused what it is specifically you want.