SGKv2

Here we will learn how to integrate n00dFootsteps into SGKv2. The SGK character has mutliple meshes and we want to make sure we isolate the mesh we consider the primary mesh that the footsteps are played from so that we can avoid duplicate sounds firing from the same animation. This asset contains tools for us to get this done easily. 

Setup

Installation

Install n00dFootsteps 2.0 to your desired Engine version

Open your SGKv2 project

On the toolbar, select Settings > Plugins

In the list, flag n00dFootsteps as Enabled

Restart the Editor

Project Settings

On the toolbar, select Settings > Project Settings

Select Gameplay Tags category

Add DTGT_N00dFootsteps to an element in the Gameplay Tag Table List array

Navigate to Engine>Physics

Add these new surface types

Restart the Editor again

Childing

Navigate to n00dFootsteps Content/Examples

Right-click on BPC_N00dFootsteps and Create Child Blueprint Class

This will allow you to modify the system while still receiving updates that don't overwrite your work.

Move this into your own project's Core folder structure outside of the plugin directory. 


Implementation

BP_SGKMasterCharacter

Open BP_SGKMasterCharacter

Add your new child of BPC_N00dFootsteps to the components window of the character

Click Class Settings

Implement the N00dFootstepsInterface. 

Compile and save

N00dFootstepsCharacter

Open N00dFootstepsCharacter

Select BPC_N00dFootsteps

In the Class Defaults

Under N00dFoosteps|Config, right-click on each of these structs and select Copy

BP_SGKMasterCharacter

Back in BP_SGKMasterCharacter, select your child of BPC_N00dFootsteps in the components window

In the Class Defaults

Under N00dFoosteps|Config, right-click on each of these structs and select Paste

Now inside you own component, you will have all the defaults filled out for you to modify however you need. 


Compile and save

Script

BP_SGKMasterCharacter

Call the N00dFootstep interface event with a reference to your child of BPC_N00dFoosteps

In the Construction Script, call ConstructFoostepsCharacter and ConstructFoostepsMesh with their appropriate references

In the collapsed graph Begin Play on the Event Graph, create a custom event and call it N00dFootstepsBeginPlay

Call it here

Create this logic, can copy this from the example character also. 

Notifies

Now we've got to go into each of the sequences we care about to add notifies to the point at which the foot hits the floor. We have a pre-made notify to call to get us going. For now we are just going to be doing the default locomotion but you'll have to go through all the animations that you need footsteps on. 

Taking a look at BS_Jog_Hands we can see there are a number of animations we will have to modify


We will just be doing one of the sequences for this example, A_Jog_Fwd_Hands


Search for it in the content browser and double-click to open it

Right Foot
Left Foot

There are 4 needed on this graph

We're hotstepping, baby!