other.transform.GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationZ;
这段代码是锁定 刚体的 X 和 Z 的旋转角
other.transform.GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationZ;
这段代码是锁定 刚体的 X 和 Z 的旋转角