The situation:
zAngle is a float.
minZ and maxZ are floats.
zAngle stays between 0 and 180.
The problem:
If I don’t use “if” below, shoulder spins around 360 degrees. I want to limit the rotation between two angles.
When the if statement is applied, the shoulder won’t rotate at all. Why not?
if(zAngle>=minZ && zAngle<=maxZ){
shoulder.transform.localEulerAngles.z = zAngle+270;
}