Footstep Materials and Footstep Texture Materials are used to add footstep effects to game objects in your scene.
They are assets in your Unity project and can be created in the Project tab via the context menu.
A Footstep Effect is what happens when a Footstepper component causes a footstep (e.g. through walking). They are set up in a Footstep Material and allow you to add audio clips and prefabs that will be used. Adding multiple audio clips or prefabs will randomly select one of the added audio clips or prefabs for each footstep.
You can set up separate audio clips and prefabs for walk, run, sprint, jump and fall footsteps. Walk, run and sprint footsteps use each other as fallbacks – e.g. if you only define Walk, a run or sprint footstep will use the walk audio clips and prefabs. To prevent that (e.g. if you only want to use audio clips or prefabs when running or sprinting, but not when walking), you need to set the Size of the audio clips or prefabs to 1 and not select any audio clip or prefab (i.e. setting up an empty effect).
Adding multiple audio clips will randomly select one of the added audio clips for each footstep. There isn’t much more to do here.
Adding multiple prefabs will randomly select one of the prefabs for each footstep.
Beside the prefab, you have multiple settings for the prefab’s placement and how long it’ll remain in the scene. Using a Footstep Manager allows you to use pooling for prefabs, preventing prefabs from being destroyed and spawned again to improve performance.
Enabling At Hit Position will place the prefab at the position the Footstepper component’s raycast hit the ground – otherwise it’ll use the position of the used foot.
Use Foot Rotation will use the rotation of the used foot – otherwise it’ll use the rotation of the Footstepper‘s game object.
Use Hit Normal will use the angle of the ground that was hit by the raycast, aligning the prefab with the ground. Depending on your prefab’s setup you might want to add a Rotation Offset.
If the prefab uses a Particle System, you can use Stop After to stop emitting particles after the defined time (in seconds). The prefab will be destroyed (or disabled, when using pooling) after the Remove After time (in seconds) – when using a Stop After time above 0, this time will be after the particle’s stopped emitting.
You can create a new Footstep Material via the context menu in the Project tab: Create > Footstepper > Footstep Material
Footstep Materials are a reusable asset that will be used by your Footstep Source components to add footstep effects to game objects in your scenes. E.g. create different materials for wood, stone, grass and water.
Footstepper uses assets for this to allow you to easily make changes to all game objects that use your footstep effects. You only have to change the effects on the Footstep Material asset to have it affect all game objects that use it.
The Default Effect is used when the Footstepper component causing a footstep doesn’t use an Effect Tag or no matching tag is defined in the material’s Tag Effects.
In short, this is the standard footstep effect of the material.
The footstep effect of the matching Tag is used if the Footstepper defined an Effect Tag. You can use tags to create different effects for e.g. ‘heavy’ and ‘light’ footsteppers. In the demo, this is used to change the footsteps to robot sounds and back to normal sounds.
Tags must be unique, you can’t define effects with the same tag.
You can use tag effects to have different effects for small or large characters in your game, or use them to change the effects based on weather effects, like using wet effects during rain.
Footstep Texture Materials
You can create a new Footstep Texture Material via the context menu in the Project tab: Create > Footstepper > Footstep Texture Material
Footstep Texture Materials are a reusable asset that will be used by Terrain Footstep Source components and the Footstep Manager to find footstep effects based on textures and sprites. You can load the textures used by a terrain using the Load From Terrain field – please note that this will remove any previously added data on the material.
The Footstep Manager will be used as a fallback in case a Terrain Footstep Source didn’t find something matching for the texture. Also, if the Footstepper didn’t find any footstep source, it’ll also fall back to the Footstep Manager to check for a texture or sprite on the game object that was hit by the raycast (via the game object’s Renderer component).
The Texture Data connects Textures and Sprites to Footstep Materials.