Help Understanding Post Process Trigger

After Spending more time on unreal, I thought I would make a jump back into the unity courses again and retry what I learnt but I seem to be having basic trouble of interacting with a post process volume on trigger.

Step by step breakdown

  • Added Post-Process Volume to the main camera.
  • Set the trigger to the player transform (Also tried the main camera with a box collider).
  • Set the post process layer blending → Layer → post.

Main Camera


  • Created a new Post process volume.
  • Set the layer to post.
  • Box collider changed to is trigger.


Created a c# script and attached to the volume.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;

public class UnderwaterEffect : MonoBehaviour
{
    public PostProcessVolume postProcessVolume;

    private void OnTriggerEnter(Collider other)
    {
        // Assuming the player has the tag "Player"
        if (other.CompareTag("Player"))
        {
            postProcessVolume.enabled = true;
        }
    }

    private void OnTriggerExit(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            postProcessVolume.enabled = false;
        }
    }
}

Other Information:

I Am using Cinemachine camera but I dont think this should be effecting the post process change.
The player character is tagged with player.

I feel like I am doing something so obvioulsy wrong, that I cant even see it. So please any help would be great on this matter

The first thing to check here… is if we’re getting a trigger at all…

private void OnTriggerEnter(Collider other)
{
     Debug.Log($"UnderwaterEffect OnTriggerEnter({other.gameObject.name}/{other.gameObject.tag})");
     if(other.CompareTag("Player")
     {
           postProcessVolume.enabled=true;
     }
}

All of that being said, just because the PLAYER is in the water does not extend the logic that the CAMERA is in the water. The effect is an interaction between the Camera and the Volume.

I don’t know if I have it set up correct, even if i have the post process volume enabled, I dont understand why the camera is not applying to the camera.

I know I am currently entering the volume because i have set it up into a statemachine and I am switching into my swim state I just can’t get the visuals to change.

What is the best option to set it up, I am thinking of when i transistion into the water trigger volume, then the post process changes, Is it because its a cinemachine camera, and not attached to the active camera?

It seems like the setup currently is not working UNITY 2022 URP, at all even when i set the post process volume to global nothing is changing.

I think the problem is with cinemachine and unitys post processing,

unity has a default post processing system for the main camera but the cinemachine also has post processing you can add volumes to the camera,

maybe the best aproach is to enable and disable this when i enter and exit the water, but then I have the problem of handling multiple post processing like the default one for the overall game.

If the camera is not in the volume, the effect won’t be shown (and would probably look strange).

I understand this, and am going to make adjustments to my work around, and apply a collider to the camera to enable and disable the post process effects on the camera its not the best method for sure, and probably a more elegant solution but it will do for meantime during prototyping

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms