Collision Sound Framework

Introduction

The Collision Sound Framework is a lightweight solution for subtle but effective Sound Effects for Collisions, in order to improve the realism and authenticity of the experience. In this tutorial we will go over how a Sound Material can be chosen for an Interactable Item, and customized depending on the structural composition of the Object.

To enable Collision Sound for a GameObject, add the MAGES Collision Sound Object component. This component requires a Rigidbody and Colliders to work (Does not require an Audio Source).

Choosing Collision Sound Materials

Collision Sound Materials

There are many Sound Materials available to choose.

  • Default (Good for a generic impact sound that does not necessarily correlate to a specific material.)

  • Wood

  • Metal (+ Small Variation)

  • Glass

  • Plastic (+ Small Variation)

  • Skin

  • Rock

  • Cardboard

The small variations are more fitting for smaller objects rather than larger ones.

The Collision Sound Material can be chosen in the Inspector view of the Interactable Item. You can also pick None, to deactivate the collision sound for this Interactable Item.

The Local Sound slider can help you dial in a more pronounced or a more subtle volume per GameObject.

Collision Sound Controller

Collision Sound Controller in the inspector

The Collision Sound Controller has a set of settings that can customize the system.

Sound Pool Size: The number of available Audio Playback prefabs allocated for playing back sounds. These can be reused, however it limits how many sounds can play at the same time. Lower values lead to less memory consumption.

Pitch Modulation Enabled, Pitch Modulation Range: Randomly set the pitch of every sound played within the range to make the sounds less repetitive.

Min Collision Volume: The minimum volume a sound can be played back at.

Max Collision Velocity: When a collision at or over this value happens, it is considered to be the highest impact possible, and the loudest sound is played.

Global Volume: Overall volume of all collisions.

Play Delay: Minimum time between collision sounds to avoid audio spam.