self:set_position
Client
Sets the position of the audio-3d instance relative to its parent
Syntax
local status = self:set_position(
position
)Parameters
| Type | Name | Description |
|---|---|---|
vector3 | position | Position to apply, relative to the parent, as {x, y, z} |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = core.audio_3d.create("sounds/ambient.ogg")
entity:set_position({0, 2, -10})
entity:play()