Mouse/axis input not clamping fast enough

We’re having an issue with the clamp node not clamping quickly enough when using a mouse. We have our input axis controlling the pitch of a camera, with a clamp to keep it in the desired pitch range.

This is our setup currently:

When using a mouse it seems to make the full sweep of the mouse then correct afterwards. This means with a large/fast enough mouse movement you can well overstep the clamped value before the rotation is corrected. In our case this causes floor clipping. It also causes jitter as the clamp fights with the mouse movement at the edge of the range.

What we really need is for the controller’s pitch rotation to stop dead at 0 and -90 degrees, allowing movement within the given range and no further.

Things we’ve tried:

  • Setting up a manual clamp with
    branches - same effect.

  • Forcing a check of the pitch before allowing input to affect anything. Unfortunately we have the same issue; the check doesn’t affect a fast mouse sweep until a degree or two past the desired rotation.

  • We tried the above using Disable Input too.

We know this is possible as we’ve seen projects with cleanly controlled camera angles before. Thank you for any suggestions.

Thanks for the fast response, that worked perfectly, exactly what we wanted thank you

Try this:

I believe the problem is due to you setting the rotation before running it through the Clamp (by using AddControllerPitchInput)