self:translate_local

Client

Translates the audio-3d instance by an offset relative to its own local axes


Syntax

local status = self:translate_local(
    offset
)

Parameters

TypeNameDescription
vector3offsetLocal-space offset to move by as {x, y, z}

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Move an audio-3d instance forward along its own local Z axis
local entity = core.audio_3d.create("sounds/ambient.ogg")

entity:translate_local({0, 0, -5})

On this page