Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question How to make a low pass filter to be active when the player enters a triggerbox collider?

Discussion in 'Audio & Video' started by khalilm376447, Sep 26, 2023.

  1. khalilm376447

    khalilm376447

    Joined:
    Mar 2, 2023
    Posts:
    25
    the trigger box collider is like water
    and when we exit the trigger box, the low pass filter get disabled
     
  2. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    290
    I would probably use AudioMixer Snapshots for this.
    With the Mixer, you can send all the sounds you want to be influenced by the low-pass on an AffectedByWater MixerGroup (sfx, room tones, weather, ...) and keep ambiances and music on other groups.
    Then you make a MixerSnapshot for AboveWater and BelowWater that adjusts a low-pass on the AffectedByWater MixerGroup and toggle between them when hitting your water collider.
     
  3. khalilm376447

    khalilm376447

    Joined:
    Mar 2, 2023
    Posts:
    25
    ok i will try thanks