Source:setOcclusion
EditSets the occlusion settings for the Source. Occlusion makes sources quieter when there is an AudioMesh blocking the path between the source and the listener.
Arguments
| Name | Type | Description |
| rays | number | The number of rays used to trace the path between the source and the listener. 0 means occlusion is disabled, 1 will result in basic occlusion, and more rays can be used to support partial occlusion for large objects. Typical values would be between 0 and 64. |
| transmissionRays | number |
The number of rays used to compute transmission. Transmission allows some audio to pass through walls, based on the AudioMaterial of the objects between the source and the listener. This is usually between 0 and 4.
|
Returns
Nothing
Arguments
| Name | Type | Description |
| enable | boolean |
Whether occlusion should be enabled. Passing true is shorthand for 64 and 4, and falsy values will disable occlusion by settings rays to 0.
|
Returns
Nothing