Download

How to make first person sequences where the AI grabs or hits the player like in Resident Evil 7 etc

You see this in a lot of games. You are fighting the AI and it will grab you, taking away controls and playing a cool animation where you get hit or something, then it goes back to game play seamlessly.

Examples:
https://youtube.com/watch?v=j0noPOSZUgAhttps://www.youtube.com/watch?v=IQo6BIdHkz4 (right at the end he grabs the player and lifts them up)

I’ve managed to do this a few different ways and the results have been kinda cool but I was wondering if anyone had any tips or experience building something like this? I’m just wondering how it’s done in AAA games and if there’s an easier way of doing it than what I’m currently doing as it’s super hard to get looking good!

Well, I never did this, but what are exactly your issues? Theorically the developers do the animations like they were animating two characters instead of the enemy grabbing something like a box, but they likely use an already modeled character as a reference or a low poly placeholder (like mannequin), if your problem is about seamless, your final frames of animation should end it with the same position values that it would be in idle.

There are a few problems and I just found a solution to them using sequencer and a trick for blending animations from game play to sequence and back.

It’s not as simple as making the animations start and finish in the same idle pose as they could be in a fight for example and not in the idle pose. Another problem is animating the first person camera to react to whatever the AI is doing to the player and be seamless also. Remember that the player and the AI could be in a totally different position each time the sequence happens.

I discovered a way to blend an animation seamlessly from game play to a sequence and then found in the documentation they have something very similar here: https://docs.unrealengine.com/latest…ing/index.html

By doing this I can trigger a sequence when the character is close to the player and blend to another camera that is attached to the character, and temporarily hide the player character.

The sequence then plays the animations of the AI grabbing/hitting/kicking the player or whatever and moves the attached camera around like a cut scene in first person.

By using sequencer and this blending technique I can create complex interaction between the AI and the player in first person seamless with game play, that can work wherever the player or AI are positioned.

I think there’s still room for improvement but this is a much more robust way of doing it than what I was doing previously and a lot easier to create.