unity 三种碰撞

Static Collider

有碰撞体组件没有刚体组件,用于一直处于同一位置不会移动的物体,被碰撞时不会被移动。不能移动该对象,否则会出现问题。static colliders should not be disabled/enabled, moved or scaled during gameplay。If you do change a static collider then this will result in extra internal recomputation by the physics engine which causes a major drop in performance. Worse still, the changes can sometimes leave the collider in an undefined state that produces erroneous physics calculations。

Rigidbody Collider

不勾选IsKinematic,刚体碰撞器完全由物理引擎模拟,可以对来自脚本的冲突和力量作出反应。 它们可以与其他物体(包括static colliders)碰撞,并且是使用物理学的游戏中最常用的碰撞体配置。

Kinematic Rigidbody Collider

碰撞体组件(勾选IsKinematic)+刚体组件,位置不会对碰撞做出反应,但可以通过脚本修改Transform组件,可以启用禁用碰撞体组件,其他情况和static Collider一样。Kinematic rigidbodies should be used for colliders that can be moved or disabled/enabled occasionally but that should otherwise behave like static colliders。例如用于门这些在必要情况下移动等等。


注:来源于官方文档

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值