Description
The Rotation
property of the SoundHandle
class represents the direction in which the sound is facing. This property is crucial for 3D sound spatialization, allowing the sound to be oriented in a specific direction within the 3D space of the game environment.
Usage
To set or get the direction a sound is facing, use the Rotation
property. This can be particularly useful when you want the sound to follow the orientation of an object or to simulate directional audio effects.
Example
// Example of setting the Rotation property
SoundHandle soundHandle = new SoundHandle();
// Set the sound's rotation to face a specific direction
soundHandle.Rotation = new Rotation(0, 90, 0); // Yaw 90 degrees
// Get the current rotation of the sound
Rotation currentRotation = soundHandle.Rotation;
// Output the current rotation
// Note: Avoid using Console.WriteLine in Sandbox environment
// Instead, use in-game debugging tools or UI elements to display this information