collisionsoundemitter - eisclimber/ExPresS-XR GitHub Wiki
Class in ExPresSXR.Interaction.Feedback
Inherits from UnityEngine.MonoBehaviour
This Component plays a sound when a collision is detected on it's GameObject. Collisions tagged with 'Player' will be ignored." It can be used to play a sound when Interactables are dropped on the ground.
public class CollisionSoundEmitter : MonoBehaviour| Name | Description |
|---|---|
| StartNoAudioWaitTime() | Prevents collision sounds for the duration of _initialSilenceDuration seconds. |
Will have no effect if _initialSilenceDuration is less or equal to zero. |
| Name | Description |
|---|---|
| AudioSource | The AudioSource used to play the provided 'dropSound'. If none is provided the current GameObject is searched for an AudioSource-Component. |
| CollisionSound | The sound played when a collision is detected. |
| RequireAudioCompletion | Prevents playing the sound again if it is already played. Good for longer sound samples. |