self:set_attenuation_filter_db
Client
Sets the attenuation filter gain of the audio-3d instance
Syntax
local status = self:set_attenuation_filter_db(
value
)Parameters
| Type | Name | Description |
|---|---|---|
float | value | Gain in decibels applied by the distance attenuation filter More negative values increase the high-frequency roll-off at distance |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = core.audio_3d.create("sounds/ambient.ogg")
entity:set_attenuation_filter_db(-6.0)