Sound.Play

SoundInst Play(Vec3 at, float volume)

Plays the sound at the 3D location specified, using the volume parameter as an additional volume control option! Sound volume falls off from 3D location, and can also indicate direction and location through spatial audio cues. So make sure the position is where you want people to think it’s from! Currently, if this sound is playing somewhere else, it’ll be canceled, and moved to this location.

   
Vec3 at World space location for the audio to play at.
float volume Volume modifier for the effect! 1 means full volume, and 0 means completely silent.
RETURNS: SoundInst Returns a link to the Sound’s play instance, which you can use to track and modify how the sound plays after the initial conditions are set.

Examples

Basic usage

Sound sound = Sound.FromFile("BlipNoise.wav");
sound.Play(Vec3.Zero);




Found an issue with these docs, or have some additional questions? Create an Issue on Github!