self:get_position

Client

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


Syntax

local result = self:get_position()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
vector3resultCurrent position relative to the parent as {x, y, z}

Examples

Get the position of an audio-3d instance relative to its parent
local entity = core.audio_3d.create("sounds/ambient.ogg")
local position = entity:get_position()

core.engine.print("info", "Audio position:", util.table.unpack(position))

On this page