Vector3 Position { get; set; }

robot_2Generated
code_blocksInput

Description

The Position property of the SoundHandle class represents the 3D position of the sound in the game world. This property is of type Vector3, which typically includes the X, Y, and Z coordinates.

Usage

Use the Position property to get or set the location of the sound in the game world. This can be useful for dynamically moving sounds to follow game objects or to create spatial audio effects.

Example

// Example of setting the position of a sound
SoundHandle sound = new SoundHandle();
sound.Position = new Vector3(10.0f, 5.0f, 3.0f); // Set the sound's position to (10, 5, 3)

// Example of getting the position of a sound
Vector3 currentPosition = sound.Position;
// Use currentPosition for further logic or calculations