Freeze rotation unity code example Example: freeze rotation in code c# GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeRotation;