bool Occlusion { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Occlusion property of the BaseSoundComponent class determines whether sound occlusion is enabled for the sound component. Occlusion simulates the effect of sound being blocked or muffled by obstacles between the sound source and the listener, providing a more realistic audio experience in 3D environments.

Usage

To use the Occlusion property, simply set it to true or false depending on whether you want occlusion effects to be applied to the sound component. This property is part of the OcclusionOverride group, which allows for more granular control over sound occlusion settings.

Example

// Example of enabling occlusion on a BaseSoundComponent
BaseSoundComponent soundComponent = new BaseSoundComponent();
soundComponent.Occlusion = true; // Enable occlusion

// Example of disabling occlusion
soundComponent.Occlusion = false; // Disable occlusion