self:set_global_position
Client
Sets the global world position of the audio-3d instance
Syntax
local status = self:set_global_position(
position
)Parameters
| Type | Name | Description |
|---|---|---|
vector3 | position | Global world position to apply as {x, y, z} |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = core.audio_3d.create("sounds/explosion.ogg")
entity:set_global_position({100, 0, -50})
entity:play()