Hello guys , i wanted to ask you if i made a mistake in this code ,because “isAlligned” always stays false.I putted it in a function which is called on Update().
if((spinningPartObj.transform.rotation.z >= 88 && spinningPartObj.transform.rotation.z <= 92) || (spinningPartObj.transform.rotation.z >= 178 && spinningPartObj.transform.rotation.z <= 182) || (spinningPartObj.transform.rotation.z >= 268 && spinningPartObj.transform.rotation.z <= 272) || (spinningPartObj.transform.rotation.z >= 358 && spinningPartObj.transform.rotation.z <= 2)) { Debug.Log("Is alligned!"); isAlligned = true; } else { Debug.Log("Is not alligned!"); isAlligned = false; }