Description
The Occlusion
property of the SoundHandle
class determines whether the sound can be occluded by geometry or other environmental factors. When set to true
, the sound will be affected by occlusion, meaning that obstacles such as walls or other objects can block or reduce the sound's audibility, simulating a more realistic audio environment.
Usage
To use the Occlusion
property, simply set it to true
or false
depending on whether you want the sound to be affected by occlusion. This can be useful in scenarios where you want to simulate realistic sound behavior in a 3D environment, such as in a game or simulation.
Example
// Example of setting the Occlusion property
SoundHandle soundHandle = new SoundHandle();
// Enable occlusion for the sound
soundHandle.Occlusion = true;
// Disable occlusion for the sound
soundHandle.Occlusion = false;