I’m trying to limit the camera’s pitch within a range of [20,-45], so I went into the function that executes whenever the LookUp axis fires, and clamped the original value to fall within the rotation range I want:
// Cast<APawn>(this)->AddControllerPitchInput(Rate); //Old code
Cast<APawn>(this)->AddControllerPitchInput(FMath::Clamp(Rate,20.0f, -45.0f)); //New, clamped version
This results in super-weird camera behavior, the boom rotates the camera to face almost straight down and never moves it. I assume that means I’m clamping the wrong value, but if I can’t alter the camera pitch I’m not sure what else I could be changing.