Description
The OcclusionRadius
property of the SoundHandle
class specifies the radius within which the sound's occlusion is calculated. This allows for partial occlusion of the sound, meaning that the sound can be partially blocked by obstacles within this radius, affecting how it is heard by the listener.
Usage
Use the OcclusionRadius
property to define how far the occlusion effect should extend from the sound source. This can be useful in scenarios where you want to simulate realistic sound behavior in environments with obstacles, such as walls or other objects that can block sound.
To set the occlusion radius, simply assign a float
value to the property:
Example
// Example of setting the OcclusionRadius for a sound
SoundHandle soundHandle = new SoundHandle();
soundHandle.OcclusionRadius = 5.0f; // Set the occlusion radius to 5 units
// This will affect how the sound is occluded by objects within 5 units of the sound source.