self:set_position

Client

Sets the position of the audio-3d instance relative to its parent


Syntax

local status = self:set_position(
    position
)

Parameters

TypeNameDescription
vector3positionPosition to apply, relative to the parent, as {x, y, z}

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Position an audio-3d instance relative to its parent
local entity = core.audio_3d.create("sounds/ambient.ogg")

entity:set_position({0, 2, -10})
entity:play()

On this page