Dynamically changing camera post processing not working in c++

You need to set some of the overrides in the FPostProcessSettings struct too. It works similarly to when editing the values in engine with the checkboxes.

Try:

void FunctionBeingTicked 
{

    FPostProcessSettings PostPro;

    PostPro.bOverride_ColorSaturation = true;
    PostPro.ColorSaturation.Y = NewValue;
    PostPro.ColorSaturation.Z = NewValue;
    PostPro.ColorSaturation.X = NewValue;
        
    VRReplicatedCamera->PostProcessSettings = PostPro;
}

This is actually mentioned in the header file for CameraComponent:

/** Post process settings to use for this camera. Don't forget to check the properties you want to override */
UPROPERTY(Interp, BlueprintReadWrite, Category = PostProcess)
struct FPostProcessSettings PostProcessSettings;
1 Like

What a coincidence, was just trying the same right now and also missed the bOverride’s. Thanks mate! <3

When i try and change my camera post processing effects in real time with c++ it doesn’t seem to affect the camera at all.

void FunctionBeingTicked 
{

	FPostProcessSettings PostPro;

	PostPro.ColorSaturation.Y = NewValue;
	PostPro.ColorSaturation.Z = NewValue;
	PostPro.ColorSaturation.X = NewValue;
		
	VRReplicatedCamera->PostProcessSettings = PostPro;
}

but when I try the same thing in BP (see below) it works first time. Not sure if it’s a syntax mistake by myself or a bug.

Any idea how to fix this?