self:set_panning_strength

Client

Sets the panning strength of the audio-2d instance


Syntax

local status = self:set_panning_strength(
    strength
)

Parameters

TypeNameDescription
floatstrengthPanning strength factor to apply
Higher values produce stronger left/right stereo separation based on the source position

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Increase stereo panning effect
local entity = core.audio_2d.create("sounds/ambient.ogg")

entity:set_panning_strength(2.0)

On this page