Description
This property provides access to the Transform
of the sound associated with this SoundHandle
. The Transform
represents the position, rotation, and scale of the sound in the 3D space, allowing you to manipulate where and how the sound is perceived in the game world.
Usage
Use the Transform
property to get or set the transformation of the sound. This can be useful for dynamically changing the sound's position or orientation based on game events or player actions.
Example
// Example of how to use the Transform property
SoundHandle soundHandle = new SoundHandle();
// Set the sound's position to a new location
soundHandle.Transform.Position = new Vector3(10, 5, 3);
// Rotate the sound to face a specific direction
soundHandle.Transform.Rotation = Rotation.FromAxis(Vector3.Up, 45);
// Scale the sound's effect in the world
soundHandle.Transform.Scale = new Vector3(1.5f, 1.5f, 1.5f);