Footstep Sources are used to add footstep effects to game objects in your scene.
They’re components you add to your game objects and use Footstep Materials to select the footstep effect.
Create custom components by extending from the base FootstepSource component or one of the existing components.
You can add Footstep Sources to game objects in your scene using the Component menu or via the Add Component button in the Inspector tab (both while having a game object selected). They can be found in the Footstepper sub-menu.
Object Footstep Source
The Object Footstep Source is used to add a footstep effect to individual game objects in your scene and supports both 2D and 3D games. The setup is pretty simple – select the Footstep Material you want to use, that’s it.
The game object must have a collider (2D or 3D) attached, either on the same game object as the Object Footstep Source component or on a child object.
Terrain Footstep Source
The Terrain Footstep Source is used to add footstep effects to terrains. Adding the component to a game object with a Terrain will automatically select the terrain.
You can select multiple Footstep Texture Materials – the first matching texture will use the assigned footstep effect of the material. If a Footstep Manager is used, it’s footstep texture materials will be used as a fallback if no match is found.
Tilemap Footstep Source
The Tilemap Footstep Source is used to add footstep effects to tilemaps. Adding the component to a game object will automatically select all Tilemap components on the game object and all child objects.
You can select multiple Tilemaps and Footstep Texture Materials – the first matching tile’s sprite will use the assigned footstep effect of the material. If a Footstep Manager is used, it’s footstep texture materials will be used as a fallback if no match is found.
Only available in Unity 2017.2 and newer, since there where no tilemaps before that version.
Trigger Footstep Source
The Trigger Footstep Source is used to ensure that an area in your game has a defined footstep effect. Simply select the Footstep Material you want to use. In the demo, this is used by the wooden stair.
The game object must have a collider (2D or 3D) with Is Trigger enabled attached on the same game object as the Trigger Footstep Source component. For Unity to register a Footstepper entering or leaving the trigger, one of the game objects also needs a Rigidbody component (2D or 3D) attached – i.e. either the trigger footstep source or the footstepper.
It’ll overrule any other Footstep Source that might be found by a Footstepper component while it is within the trigger.
Mesh Footstep Source
The Mesh Footstep Source is used to add footsteps to meshes that use either multiple materials or texture atlases. For simple meshes that only use one material and don’t use texture atlases, you can simply use an Object Footstep Source.
You can select multiple Footstep Texture Materials – the first matching material or texture will use the assigned footstep effect of the material. If a Footstep Manager is used, it’s footstep texture materials will be used as a fallback if no match is found.
Please note that this footstep source requires using a Mesh Collider in combination with the mesh, as otherwise there is no information on where on the mesh the footstep occured.