PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

RollOffMode

RollOffMode

How 3D Sound|Sounds attenuate (fade out) as the distance between the listener and the Sound’s parent increases.

What is Attenuation?

Acoustic attenuation refers to how sound diminishes as it travels through a medium or across increasing distances.

Inverse vs Linear Distance Attenuation

Inverse distance attenuation (Enum.RollOffMode.Inverse) mirrors how sounds attenuate in the real world. Under inverse distance attenuation, sounds will begin to attenuate once the distance between the listener and the Sound’s parent exceeds Sound/EmitterSize. The rate of attenuation depends on the emitter size, as sounds with larger EmitterSize’s will attenuate at a slower rate. Inverse rate of inverse distance attenuation is further influenced by SoundService/RolloffScale.

Note, Sound/MaxDistance will not effect attenuation under the inverse model but will cause the sound to cut off completely once this distance is reached. This can be particularly abrupt when using low values for max distance.

Linear distance attenuation works differently. Under linear distance attenuation the sound will attenuate between EmitterSize and MaxDistance, falling silent once MaxDistance is reached. EmitterSize still denotes the point at which the sound will begin attenuating. However, the audible volume at any point now depends on the point the listener is at between EmitterSize and MaxDistance. This means, in contrast to the inverse distance attenuation model, the audible volume of the sound will approach silence at MaxDistance point. This is less realistic, but may be more desirable in some cases.


Enums

Name Value Description

Inverse

0

Volume attenuates from Sound/EmitterSize in an inverse manner

Linear

1

A hybrid model. Follows the Inverse model when close to Sound/EmitterSize and the Linear Square model when close to Sound/MaxDistance

InverseTapered

3

Volume attenuates between Sound/EmitterSize and Sound/MaxDistance with a linear relationship

LinearSquare

2

Volume attenuates between Sound/EmitterSize and Sound/MaxDistance with a linear squared relationship

Referenced by

  • Sound/RollOffMode