Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

Gameplay Ability System + Motion Matching

Description
  • Date: March 20, 2025
  • Categories: ProjectsUE5

Gameplay Ability System (GAS) + Motion Matching

One of the best plugins for unreal engine combines a huge varety of progressive animations that blend each other smoothly, in order to give a fluid movement in-game. But how this happens in real work environment?

To demonstrate it’s potential I combined a Motion matching system in Unreal 5.4 with Gameply Ability System and created a sets of Abilities that blends witht the Motion Matching

 

What I used for this project?

Unreal Engine 5.4; Motion Mathing 5.4 version; Gameplay Ability System (GAS); Blueprints & C++ for an hybrid approach.

Implementation

First of all, I implemented the GAS plugin, since it requires a bit of setup. You can find all the material in the Unreal official documentation

After that I imported the Mannequin Blueprint (with every other mesh, bp and animations sequences) in my project starting from a new one

Disclamer: in this project I used 5.4 version since the 5.5 was not on the market yet, so all the IK rig is implemented by myself; an upgrade to the new version will result in smoother animations (since there ar

e hundreds more for each case) but is suggested to start a project from scratch rather than update this one since the amout of complexity and changes from the previous verison.

Other than a simple trigger for abilities I spent some time to implement some Base Attributes for the character, because is more engaging to see the stats of your player, doesn’t it? This are Health (in red), Stamina (in green) and Energy (in Yellow). Stamina is for sprinting and Energy is for abilities, and all of three restores after some time.

How to shoot a rock

The idea is simple: the character crouches on the bottom in search of a rock, it grabs it and throws it to the enemy. Nothing unusual, but lets add a complication: I wanted the player to be able to move while doing that, avoiding attack from the enemies while doing that. Is not pleasing to receive all the attacks while you are doing a simple crouching, isn’t it?

I used the animation Blueprint to split the body in 2 parts, one above the pelvis where the animation should be player and one under the pelvis, where the motion matching will continue undisturbed.

Here is how I implemented iside the Animation Blueprint if you are curious

Note: I used Inertialization for this, otherwise the animation won’t work correctly:

After splitting the body in 2 parts now I needed to force the upper part to crouch a bit more since I wanted to give the idea of the player picking up something from the ground. I simply created a trigger in the animation blueprint which changes a variable called DoCrouch at the right moment.

And now after all of this I coould Implement an animation in the Ability, and this is the result:

How to unlock the Matrix

Let’s say is pretty cool to have for our character an ability to stop bullets in mid air, but how to implement?

First let’s this about our main implementation, once the ability is activated we could spawn an invisible wall in front of the player, attach it to his hand and from that moment detect every projectile collision and stop them.

Straightforward: what about the animation?

We can use the same technique as before and split the body in 2 parts: the one that we want animate and the one we dont want.

This animation is pretty straightwarward so I did by miself using only the unreal Sequencer

Now after that let’s split the bone from the upperarm_r bone

This is the result:

I added also some warping animation, because is more cool to see.

 

How to punch

This is the most straightforward ability, and does not require further Motion matching Implementation but is a set of combo inside Gameplay Ability System: the approach I used was with Gameplay Tags, carefully assiged to the player in specific framw window where you can re-trigger the ability and move to the next one with the same trigger button, in my case the left-mouse.

If you are curious about it I left for you the implementation for the first punch, the other ones are pretty straight-forward, and they just need to change some parameters in the class defaults in order to block further unwanted abilities

 

That’s all folks. Hope you enjoyed my explaination on this topic and invite you to try by yourself, once understood the process is just settings and pretty straightforward with a medium-hight complexity.