赞
踩
无论是3D刚体还是2D刚体的移动,产生向前滑动的时候,都可以锁定位移。
横板2D 角色进行移动的时候
rig.constraints = RigidbodyConstraints2D.None;
rig.constraints = RigidbodyConstraints2D.FreezeRotation;
横板2D 锁定2D刚体滑动位移
rig.constraints = RigidbodyConstraints2D.FreezeAll;
3D刚体,角色进行移动
rig.constraints = RigidbodyConstraints.None;
3D刚体,角色锁定滑动位移
rig.constraints = RigidbodyConstraints.FreezeAll;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。