I’m rotating something but I want it to go to 180 degrees once it reaches 170+
this is what I have:
case 0:
float roty = transform.rotation.y;
camera.orthographicSize = Mathf.Lerp(camera.orthographicSize, 10, 1*Time.deltaTime);
if(roty >= 0.9974061) {
print ("sup");
roty = 1;
}
transform.rotation = Quaternion.Lerp (transform.rotation, new Quaternion(0, 180, 0, 0), Time.deltaTime * 0.003f);
break;
WHen it reaches if(roty >= 0.9974061) {
print (“sup”);
It tells me “sup” but it doesnt set the rotation to 1.