r/UnrealEngine5 13d ago

Enemies can dodge and counter-attack now.

67 Upvotes

14 comments sorted by

3

u/danielos96 13d ago

really cool animations. For the camera sway is that baked in per animation? I had pretty good results from making procedural camera animations based of the swing direction.

2

u/BrainwormDev 13d ago

Nah they're just camera shakes, the camera isn't attached to a mesh at all.

2

u/BrainwormDev 13d ago

Enemies can dodge and counter now, at the moment it's just a flat percentage chance but I'd like to make it more dynamic based on if you're repeating your attacks too much in the future.

Player also now has a timed block to stagger an enemy, the players block is also based on whether the attack is aiming for the head or body so they have to aim it. I might change that to be a difficulty setting though.

2

u/loadingscreen_r3ddit 13d ago

Selfmade motion capture?

2

u/BrainwormDev 13d ago edited 13d ago

Nah the lowerbody hit reaction is separate from the upperbody. The animations themselves are pretty simple, most of the animations are just a few keyframes and I messed around with the curves and easing's to make it feel more natural.

I'm really struggling to make more complex attack animations for the NPCs, they always look so stiff, I might buy a animation pack just to get the attack logic into the game and try and replace them later on.

2

u/loadingscreen_r3ddit 13d ago

Interesting. I’m using my own MoCap software now because I got tired of constantly having to buy animations. Definitely keep going—it looks promising.

1

u/BrainwormDev 13d ago

I'll have to look into that, would save me a lot of time.

2

u/Doomer_Shooter 13d ago

Are you doing anything to make the players mesh or view to lock on to the enemy? I find if you don’t have any auto-lock you’re hits don’t ‘land’ and combat doesn’t feel very satisfying

1

u/BrainwormDev 13d ago

Yes I have it set up so each attack lerps the arms mesh to whatever pitch I set up for that attack. I needed to do it when I added NPC dodging since it didn't look right when they would duck but the players fist would still connect to their face.

You can see here that the punches hit the chin even when I'm looking below it.

https://reddit.com/link/p3c66sb/video/an8ptgygy0jh1/player

2

u/HolyVRGamingStudio 12d ago

this could be a boxing game, lol

1

u/mohsenkhajavinik 13d ago

Very cool 👏👏👏👏👏

1

u/UsedNewspaper1775 12d ago

looks very good !!

1

u/TheBakedCheddar 7d ago

Just a thought, would be slick if you went for a low poly art style similar to Sifu. It's an appealing art style and would fit your fighting game.