Ok so i had a script for slowing down time and physics when space is held but i tried to add post processing effects (specifically chromatic aberration) when it does that and Unity was like “Nope! Wrong answer!” and now the entire thing doesn’t work
Here’s my awkward shambling together of scripting stuff i know I tried to do this with ::
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
public class slowDownPhysics : MonoBehaviour
{
//Are you happy now Unity console?
private float fixedDeltaTime;
//Sort out Post Processing
PostProcessVolume m_Volume;
ChromaticAberration m_ChromaticAberration;
void Awake()
{
//Appease the C# Gods
this.fixedDeltaTime = Time.fixedDeltaTime;
m_ChromaticAberration.intensity.value = 0;
}
void Update()
{
//Detect if space pressed
if (Input.GetButton("Jump"))
{
if (Time.timeScale == 1.0f)
{
//Slow down time + Post Processing
Time.timeScale = 0.15f;
m_ChromaticAberration.intensity.value = 1;
}
//Make it so Unity doesn't fuck it up
Time.fixedDeltaTime = this.fixedDeltaTime * Time.timeScale;
}
else
{
//Keep time normal
Time.timeScale = 1.0f;
m_ChromaticAberration.intensity.value = 0;
}
}
}
Please help.