self:set_unit_size

Client

Sets the unit size of the audio-3d instance


Syntax

local status = self:set_unit_size(
    value
)

Parameters

TypeNameDescription
floatvalueReference distance at which the audio plays at full volume
Increasing this value makes the audio audible at greater distances

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set the unit size of an audio-3d instance
local entity = core.audio_3d.create("sounds/ambient.ogg")

entity:set_unit_size(10.0)

On this page