- Documentation
- Client functions
- getSoundOcclusion
Function
getSoundOcclusion
Trilogy Hub extension: returns how strongly walls between the camera and a 3D sound muffle it. 0 = nothing in the way, 1 = a thick wall with no way around. It changes smoothly.
Syntax
float getSoundOcclusion(sound theSound)Arguments
theSoundsound- The sound.
Returns
Occlusion 0-1 or false.
Example
if getSoundOcclusion(radio) > 0.5 then
outputChatBox("Muzyka gra za ścianą")
end
See also
playSound3DPlays a sound (a file or an internet stream) at a point in the world. Full volume up to 5 m, then it fades smoothly and loses high tones, silent from 20 m. Walls and buildings between the camera and the sound make it quieter and leave a muffled bass (getSoundOcclusion). It is panned left-right.getSoundHeardVolumeReturns the volume the player actually hears: after distance from the camera and after the volume slider in the settings.