unity prevent child of object from rotating code example Example: unity stop object from rotating rigidbody.freezeRotation = true;