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.
Colliders for 2D GameObjects all have names ending “2D”. A Collider that does not have “2D” in the name is intended for use on a 3D GameObject. Note that you can’t mix 3D GameObjects and 2D Colliders, or 2D GameObjects and 3D Colliders.
The Collider 2D types that can be used with Rigidbody 2D are:
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.
Did you find this page useful? Please give it a rating: