Description
The DistanceAttenuation
property determines whether the sound should fade out over distance. When set to true
, the sound will gradually decrease in volume as the listener moves further away from the sound source. This property is useful for creating realistic audio environments where sound intensity diminishes with distance.
Usage
To use the DistanceAttenuation
property, simply set it to true
or false
depending on whether you want the sound to fade out over distance. This property is part of the SoundEvent
class, which is used to define how sounds are played in the game.
Example usage:
SoundEvent mySoundEvent = new SoundEvent();
mySoundEvent.DistanceAttenuation = true; // Enable distance attenuation
Example
SoundEvent mySoundEvent = new SoundEvent();
mySoundEvent.DistanceAttenuation = true; // Enable distance attenuation