M MY Multiplayer: Wiki
Side
Kind

setSoundPanningEnabled

Client

Turns stereo panning on or off for a 3D sound. When on, the sound leans left or right depending on the camera. It starts on.

bool setSoundPanningEnabled(sound sound, bool enabled)

Parameters

NameTypeDescription
soundsoundThe sound element, or a dui element for the browser's sound.
enabledbooltrue for the sound to come from the side it is on.

Returns

true if it was applied, false if the sound is not 3D or was not found.

Example

local ambience = playSound3D("sounds/wind.ogg", 0, 0, 10, true)
setSoundPanningEnabled(ambience, false)

See also