Giving a Character footstep sounds

Update: For Mecanim characters, a new "Footstep Sounds" script is included that makes use of animation events to sync sound with movement - see its script reference here.

Adding sound to a Character's footsteps helps bring immersion to a game.

In our Character inspector (either the Player or NPC script), there is a panel called Audio clips. Assign your Walk and/or Run sounds here.

Unity sounds play out of the AudioSource component, but while a Character may already have one attached, it will be used for speech audio and should be left alone. Instead, we'll add a new component on as a child object.

With your Character in your scene, go to the Scene Manager and create a Sound prefab.

Make sure the Sound inspector's "Sound type" field is left as SFX, so that it's volume is linked to the correct Options field, and drag it over your Character to make it a child of the Player.

Now all that's left is to tell the Character to play our footstep sounds from this object. Back in our Character's inspector, go to the Audio clips panel and assign this Sound object as the Sound child field.

Adventure Creator and this website are copyright Chris Burton, ICEBOX Studios

Go to top
Do NOT follow this link or you will be banned from the site!