时间:2021-07-01 10:21:17 帮助过:4人阅读
用按位或(bitwise OR)实现,例如:
GetComponent<Rigidbody>().constraints=RigidbodyConstraints.FreezeRotation
|RigidbodyConstraints.FreezePositionX
|RigidbodyConstraints.FreezePositionZ;
二,去掉所有限制:
GetComponent<Rigidbody>().constraints=RigidbodyConstraints.None;
unity, Rigidbody.constraints
标签: