This guide will walk you through adding n00dFootsteps Plugin to your own project. The plugin also supports Modular Gameplay Features but isn't packaged for it out of the box, and is not covered in this tutorial.
Getting Started
Plugin Setup
After adding the plugin to your library, go to your vault and install it to your desired Engine verison. Alternatively, you can download it from GitHub.
Navigate to the Edit menu and select Plugins
Enable the Plugin
And Restart the Editor
Adding Character Component
Once you're back in, open the ThirdPersonCharacter blueprint
Add the component to the character
The defaults of the component can be mutated with your own data - these are example data assets that the system will use. We will make our own later in this guide, but for now we will setup the fundamentals.
Hover over any one of these variables for more information.
Check the Debug flag here if you'd like more information about the controlled character in our testing phase.
Config
You need to tell the Editor what surfaces exist; you can do this through the DefaultEngine.ini, or the Project Settings under Physics.
DefaultEngine.ini
[/Script/Engine.PhysicsSettings]
+PhysicalSurfaces=(Type=SurfaceType1,Name="Concrete")
+PhysicalSurfaces=(Type=SurfaceType2,Name="Dirt")
+PhysicalSurfaces=(Type=SurfaceType3,Name="Glass")
+PhysicalSurfaces=(Type=SurfaceType4,Name="Grass")
+PhysicalSurfaces=(Type=SurfaceType5,Name="Gravel")
+PhysicalSurfaces=(Type=SurfaceType6,Name="Metal")
+PhysicalSurfaces=(Type=SurfaceType7,Name="Mud")
+PhysicalSurfaces=(Type=SurfaceType8,Name="Rock")
+PhysicalSurfaces=(Type=SurfaceType9,Name="Water")
+PhysicalSurfaces=(Type=SurfaceType10,Name="Wood")
+PhysicalSurfaces=(Type=SurfaceType11,Name="Sand")
+PhysicalSurfaces=(Type=SurfaceType12,Name="GrassDry")
+PhysicalSurfaces=(Type=SurfaceType13,Name="Forest")
Make sure that you don't duplicate the [/Script/Engine.PhysicsSettings] block.
Project Settings
Setting Up Animations
Open the locomotion animations and under the Window menu make sure that Animation Data Modifiers is opened
Hit the Add Modifier dropdown and select AM_N00dAutoFootsteps, followed by Apply All Modifiers.
Do this with all your locomotion animations you want to have footsteps.
Testing
Data
Data Assets
Right-click in the folder you want to create a data asset, and navigate to Miscellaneous>Data Asset. Choose from one of the included Primary Data Assets for your new Data Asset
PDA_N00dFootprint
Override ConvertToFootprint in the component to handle different implementations if you add more data here, such as creatures with misfigured feet
This primary data asset contains data that we use in the component for a standard bipedal character. You may extend this however you'd like. Left and Right feet are determined by the anim notify and not by the data in this asset.
PDA_N00dFootstepsFoley
Here we have a container for defintions that span across all characters that want foley.
Create however many foley defintions you want and define them in the component
View from the data asset
PDA_N00dFootstepsSurface
This is how you define each surface that you want footsteps to know about.
Casts
All variables used in the footsteps component are base engine classes or data types, and we have helper functions that cast to the the variable or type we are after. Feel free to extend the included data types or override these casts with your own conversions.