Game Creator's characters can mix and play multiple sound effects depending on the type of ground it's stepping on.
Humanoid and Non-Humanoid
This system works for humanoid and non-humanoid characters alike. Though humanoids don't require any kind of setup and work out of the box.
The Footstep System detects when any identified bone passes through an horizontal threshold called Ground Threshold. When this occurs, the Footstep System raises a signal informing that a step has been taken.
Playing Footstep Sounds¶
The Footstep Sounds system comes with a built-in tool for playing different sounds and sound variations depending on the surface the character is stepping onto. To create a material sound library, right click on the Project Panel and select
Create - Game Creator - Common - Material Sounds.
The Material Sounds asset allows to define which textures produce which sound effects. Each texture can have multiple sound effects, which will be picked up randomly every time the character takes a step.
Pseudo-Random Sound Picking
Note that although it's completely random, two sound effects will never be played in succession in order to avoid repetition.
The Material Sounds asset also allows to instantiate a game object from a pool of prefabs at the impact position. The instantiated object is aligned with the incision angle. This is very useful when spawning particle effects of dust.
The human hearing quickly recognizes sound patterns. To avoid hearing the same sound effects over and over again, the Footstep Sound System intelligently shifts the pitch and speed of each audio clip every time it's played. By doing so, a single clip can be played hundreds of times with various nuances that tricks the human hearing into perceiving each clip as a different sound effect.
Gradient Footstep Sounds
Floors are not always composed of discreet materials. For example, there might be a sound effect for when the player steps on shallow water and another one when steps on sand. However, if the character runs along the shore, where there's a blend between the water and sand textures, the resulting sound effect is a proportional mix between the two audio clips and their pitch is shifted to fit how real-life audio blending occur.
Drop the Material Sounds asset onto the Character's
Sound Asset to link them.
Reacting to Footsteps¶
The Footstep system also allows Characters to react every time a step is taken. Using the On Step Trigger, which is executed every time a defined Character takes a step. This is useful for things like leaving footsteps behind.