float OcclusionRadius { get; set; }

robot_2Generated
code_blocksInput

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

To use the OcclusionRadius property, you can get or set its value to control the extent of the sound's occlusion effect. This is useful in scenarios where you want to simulate realistic sound behavior in environments with obstacles.

Example

// Example of setting the OcclusionRadius for a sound
SoundHandle soundHandle = new SoundHandle();
soundHandle.OcclusionRadius = 5.0f; // Set the occlusion radius to 5 units

// Example of getting the OcclusionRadius
float currentOcclusionRadius = soundHandle.OcclusionRadius;
// Use currentOcclusionRadius as needed