Skip to content

How to Set Up Occlusion

Guribo edited this page Jul 11, 2026 · 4 revisions

How to Set Up Occlusion

Step-by-step guide for configuring audio occlusion in your world.

Prerequisites

  1. TLP_PlayerAudioController prefab in your scene at Packages/tlp.udonvoiceutils/Runtime/Prefabs/Core/TLP_PlayerAudioController.prefab
  2. TLP_Essentials prefab at Packages/tlp.udonutils/Runtime/Prefabs/TLP_Essentials.prefab

Set Up Environment Occlusion

1. Configure Colliders

Ensure walls, floors, and ceilings have colliders on the Environment layer:

  1. Select the wall/floor GameObject
  2. In the Inspector, set the layer to Environment
  3. Ensure the collider is present (BoxCollider, MeshCollider, etc.)

2. (Optional) Add AudioObstacle for Per-Obstacle Control

  1. Add the AudioObstacle component to your wall/floor GameObject
  2. Set ObstacleClarity:
    • 0 = fully blocks sound (thick wall)
    • 0.5 = partially muffles (thin wall, glass)
    • 1 = fully transparent (doorway, window)

3. Configure Layer Mask

  1. Select the TLP_PlayerAudioController GameObject
  2. Find Occlusion settingsOcclusion Mask
  3. Ensure Environment layer is checked
  4. (Optional) Check UI layer to enable player occlusion

4. Test

  1. Play in editor with ClientSim
  2. Position yourself behind a wall from another player
  3. Voice should sound muffled when the wall is between you

Troubleshooting

Symptom Cause Fix
No occlusion Layer mask missing Environment Add Environment layer to OcclusionMask
Occlusion too strong All obstacles at clarity 0 Increase ObstacleClarity on AudioObstacle
Occlusion too weak Obstacles on wrong layer Check collider layer is Environment
Player occlusion not working UI layer not in mask Add UI layer to OcclusionMask

See Troubleshooting for more issues.

See Also

Clone this wiki locally