Version: 2022.3
Language : English
Rigidbody 2D properties: Simulated
Circle Collider 2D

Collider 2D

Collider 2D components define the shape of a 2D GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary
for the purposes of physical collisionsA collision occurs when the physics engine detects that the colliders of two GameObjects make contact or overlap, when at least one has a Rigidbody component and is in motion. More info
See in Glossary
. A colliderAn invisible shape that is used to handle physical collisions for an object. A collider doesn’t need to be exactly the same shape as the object’s mesh - a rough approximation is often more efficient and indistinguishable in gameplay. More info
See in Glossary
, which is invisible, doesn’t need to be the exact same shape as the GameObject’s meshThe main graphics primitive of Unity. Meshes make up a large part of your 3D worlds. Unity supports triangulated or Quadrangulated polygon meshes. Nurbs, Nurms, Subdiv surfaces must be converted to polygons. More info
See in Glossary
; a rough approximation is often more efficient, with no noticeable difference in gameplay.

Colliders for 2D GameObjects all have names ending with 2D. A collider that doesn’t have 2D in its name can only be used on a 3D GameObject. You can’t use 3D GameObjects with 2D colliders, or 2D GameObjects with 3D colliders.

Note: On the RigidbodyA component that allows a GameObject to be affected by simulated gravity and other forces. More info
See in Glossary
2D component, select the Use Auto Mass checkbox to automatically set the Rigidbody 2D’s mass to the same value as the Collider 2D’s mass. You can use this in conjunction with the Buoyancy Effector 2D.

You can use the following Collider 2D types with Rigidbody 2D:

Topic Description
Circle Collider 2D Use Circle Collider 2D for circular collision areas.
Box Collider 2D Use Box ColliderA cube-shaped collider component that handles collisions for GameObjects like dice and ice cubes. More info
See in Glossary
2D for square and rectangle collision areas.
Polygon Collider 2D Use Polygon Collider 2D for freeform collision areas.
Edge Collider 2D Use Edge Collider 2D freeform collision areas and areas which aren’t fully enclosed (such as rounded convex corners).
Capsule Collider 2D Use Capsule ColliderA capsule-shaped collider component that handles collisions for GameObjects like barrels and character limbs. More info
See in Glossary
2D for circular or lozenge-shaped collision areas.
Composite Collider 2D Use Composite Collider 2D for merging Box Collider 2Ds and Polygon Collider 2Ds.
Custom Collider 2D Use Custom Collider 2D for collision areas with customizable geometry.

Additional resources

Rigidbody 2D properties: Simulated
Circle Collider 2D
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961