I want to limit the rotation of an object not to go out of bounds. Im currently doing that with
Quaternion newRot = trParent.rotation * Quaternion.Euler(0, 0, Speed);
if (newRot.eulerAngles.z > 80 && newRot.eulerAngles.z < 285 )
return;
trParent.rotation = trParent.rotation * Quaternion.Euler(0, 0, Speed);
How can i do that using Mathf.Clamp() ??