Collider 2D components define the shape of a 2D GameObject for the purposes of physical collisions. A Collider, which is invisible, need not be the exact same shape as the GameObject’s Mesh; in fact, a rough approximation is often more efficient and indistinguishable in gameplay.
2D 游戏对象的所有碰撞体的名称都以“2D”结尾。名称中没有“2D”的碰撞体将用于 3D 游戏对象。请注意,不能混用 3D 游戏对象和 2D 碰撞体,也不能混用 2D 游戏对象和 3D 碰撞体。
可用于 2D 刚体的 2D 碰撞体类型为:
On the Rigidbody 2D component, tick the Use Auto Mass checkbox to automatically set the Rigidbody 2D’s mass to the same value as the Collider 2D’s mass. This is particularly useful in conjunction with the Buoyancy Effector 2D.