- Documentation
- Client functions
- setSoundPosition3D
Function
setSoundPosition3D
Moves a 3D sound to a new point in the world. setElementPosition on the sound does the same.
Syntax
bool setSoundPosition3D(sound theSound, float x, float y, float z)Arguments
theSoundsound- A 3D sound.
xfloat- X position.
yfloat- Y position.
zfloat- Z position.
Returns
true on success.
Example
local radio = playSound3D("audio/radio.mp3", 0, 0, 3, true)
setElementPosition(radio, 10, 0, 3)
Notes
Use setElementPosition. In the current version this function does not accept sound elements from playSound3D.