float SpacialBlend { get; set; }

robot_2Generated
code_blocksInput

Description

The SpacialBlend property of the SoundHandle class determines how 3D the sound should be. A value of 0 indicates that the sound is not spatialized and will be perceived as a 2D sound, while a value of 1 means the sound is fully spatialized, providing a 3D audio experience. This property allows for fine-tuning of the spatial characteristics of a sound, enhancing the immersive experience in a 3D environment.

Usage

To adjust the spatial blend of a sound, set the SpacialBlend property to a value between 0 and 1. This can be useful for dynamically changing how a sound is perceived in the game world, such as transitioning a sound from a background music track to a localized sound effect.

Example

// Example of setting the SpacialBlend property
SoundHandle soundHandle = new SoundHandle();

// Set the sound to be fully 3D
soundHandle.SpacialBlend = 1.0f;

// Set the sound to be 2D
soundHandle.SpacialBlend = 0.0f;

// Set the sound to be partially 3D
soundHandle.SpacialBlend = 0.5f;