Legacy Documentation: Version 2018.1 (Go to current version)
Rigidbody 2D
Circle Collider 2D
Other Versions

Collider 2D

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:

Use Auto Mass

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.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答