Combat Demo Created in Unreal Engine 4 Using Custom Rigged Character and Animations
This project was created to demonstrate the flexibility of my custom rig and utilizes the Dynamic Combat System customized to work with my custom character. I started with creating a series of combat and movement animations using the custom rig I created in my first project.
Here you can see a standing back-step dodge that was implemented in the combat demo to be triggered whenever the player dodged without using directional controls or when not locked on to an enemy. 
Standing dodge backwards in Maya 
Here you can see the same animation with the skeleton and controls activated. Keys were added to the root joint between the character's feet specifically to work properly with Unreal Engine's root motion settings. Without that root joint animation, the character would be continuously sucked backward to the animation's point of origin when the animation is triggered in gameplay.  
Standing dodge backwards with controls and skeleton visible in Maya
The combat demo required quite a vast array of animations from basic motion animations like running and walking with weapons equipped and unequipped to a wide variety of combat animations. Below you see the greatsword thrust attack, first without controllers and joints showing. 
Greatsword thrust animation in Maya
Here we see the greatsword thrust animation with joints and controllers in view for reference on how the movement was created. 
Greatsword thrust animation with controls and skeleton visible for reference in Maya
Left-handed shield parry animation with right-hand greatsword equipped first shown with joints and controllers present, then shown without. 
Shield blocking animation in Maya
Shield blocking animation with controls and skeleton visible for reference in Maya
In order to use all of these animations in the combat demo, I had to first export them all out in a specific way so that they'd work as desired within Unreal. This required baking the animations to the skeleton of the rig and removing that rig from my group hierarchy so that it was not parented within the group structure of the rig. Once exported out of Maya and brought into Unreal, I had to create montages for each animation to plug into a DataTable that was used to call each animation associated with each action and control input. 
Roll dodge animation in Unreal with Enable Root Motion selected. This prevents the character from being sucked back to the point of origin after triggering this animation to dodge in the combat demo level. 
After quite a bit of trial and error in the past with dodging animations, I realized that I had to first animate them in a very specific way, where the root bone was keyed to travel with the rest of the body, then check the enable root motion option within the animation once it was imported into Unreal to make sure the dodging was functioning properly. In the past, I had major issues with getting the root bone to animate properly in Maya, so this was an exciting milestone for me. 
Roll dodge montage in action showing all the notifies that control the behavior that is triggered by the roll dodge. 
For each animation, I had to create a montage that included numerous notifies so that the animation would also be associated with certain actions. The roll dodge animation below triggers a certain sound, calls a notify that allows the player to rotate in any direction while roll-dodging, makes the player immortal during the core portion of the animation, and makes sure the animation cannot be interrupted once it's hit a certain point. 
Here you can see the roll dodge animation implemented in the combat demo level.
The custom character can roll in a variety of directions and the roll dodge is triggered when directional input is detected along with the dodging input. She does a simple back-step dodge when there is no directional input detected when the dodging animation is triggered. 
Back-step dodging animation is triggered when the dodge input is pressed without any additional directional input. 
A montage was created for every animation and added to a data table, which was referenced by the main character blueprint to grab the specific animation needed for each montage. A few of the montages, like the drink potion montage, were called within specific functions rather than being stored in and grabbed from a data table. 
Drink Potion Montage setup in Unreal Engine
Get Use Montage Function within the Item_Potion Function. This is where the Drink Potion Montage is called. 
Various other steps went into the implementation of the custom rig character into the combat system within Unreal including the creation of an aim offset for the shield blocking mechanism, blendspaces for walking and running both armed and unarmed, an animation blueprint that ties everything together, and the the main character blueprint that controls everything. 
Shield Blocking Aim Offset in action
Armed Walking and Running Blendspace in action
Linking the direction and speed from the armed walking blendspace to the aim offset setup for blocking with a shield to create a reference pose with in the animation blueprint for our character.
Each montage is given a FullBody or UpperBody classification based on the movements contained within the animation. This portion of the animation blueprint blends those poses together to form our final animation pose, allowing our character to move and fight freely within the combat demo.
The combat demo also features a basic menu system, on screen UI that gives the player a health bar and endurance meter, and AI rat warrior enemies, which are only appropriate given the main character is an anthropomorphic cat! 
Our anthropomorphic cat character
Character Blueprint for our Rat Marauder enemy
Character Blueprint for our Skeletal Rat enemy
Behavior tree controlling the behavior of our rat enemies
Montages, blendspaces, and aim offsets had to be created and implemented in the same way for the rat enemies as they were created for the main character. Notifies were added to each montage to trigger certain sound effects, actions, and behaviors. Then the montages were placed in a data table and referenced by the rat character blueprints in the same fashion as the main character. 
This montage toggles the rats into combat mode and calls their screaming sound effect. Toggling combat mode to on, triggers the "is in combat" portion of their behavior trees, allowing them initiate combat with our player character. 
The menu system and entire combat demo function with input from a mouse and keyboard as well as with a game controller. 
This clip shows the main menu of the combat demo into playing the game, then the pause menu, which freezes the background and blurs it, back to the main menu and then quitting the game. 
The on screen UI features a health and stamina bar with a mana bar to be implemented later with magic combat animations. Here you can also see what weapons and consumable the player currently has equipped. 
Finally, let's see our custom character kick some butt! 
Here we see our character and enemies in action

You may also like

Back to Top