i want to reset just the z axis to 0 (angle)
how can i do it?
this is the code that i tried:
transform.rotation.SetEulerAngles(transform.rotation.eulerAngles.x,transform.rotation.eulerAngles.y,0);
i want to reset just the z axis to 0 (angle)
how can i do it?
this is the code that i tried:
transform.rotation.SetEulerAngles(transform.rotation.eulerAngles.x,transform.rotation.eulerAngles.y,0);
Try this:
this.transform.eulerAngles = new Vector3(this.transform.eulerAngles.x, this.transform.eulerAngles.y, 0);
thanks it help
– raymanbs