Limiting rotation on the X Axis

Hello everyone, I’m quite new to programming and I can’t wrap my head around something as simple as this.

I’m trying to program a steering wheel, where the minRotation would be -90 degrees and the maxRotation
would be 90 degrees.

But I can’t figure out how to limit the rotation on the X axis…
Any ideas?

Thanks

Would you care to elaborate?
maybe show us your code?

Idea: Do the rotation calculation, and clamp the calculated value with Mathf.Clamp() function. you can set min value and max value.

1 Like