how to freeze x rottion in untiy code example
Example: freeze rotation in code c#
GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeRotation;
GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeRotation;