Version: Unity 6.5 (6000.5)
Language : English
Composite Collider 2D
Combine Colliders with the Composite Collider 2D

Composite Collider 2D component reference

The Composite Collider 2D component is a Collider 2D that interacts with the 2D physics system. Unlike most colliders, it doesn’t have an inherent shape. Instead, it merges the shapes of any Box Collider 2D, Polygon Collider 2D, Circle Collider 2D or Capsule Collider 2D that it’s set to use. The Composite Collider 2D component uses the vertices (geometry) from any of these colliders, and merges them together into new geometry controlled by the Composite Collider 2D component itself.

Property Function
Material Select the Physics Material 2DUse this to adjust the friction and bounce that occurs between 2D physics objects when they collide More info
See in Glossary
that determines properties of collisions, such as friction and bounce.
Is Trigger Enable this if you want the collider to behave as a trigger. The physics system ignores the collider when you enable this option.
Used By Effector Enable this if you want an attached Effector 2D component to use the collider.
Offset Set the local offset values of the collider geometry.
Geometry Type Select the type of geometry to merge the vertices of the selected colliders into. Select either Outlines or Polygons from the dropdown menu.
    Outlines Select this to produce a collider with hollow outlines, identical to an Edge Collider 2D.
    Polygons Select this to produce a collider with solid polygons, identical to a Polygon Collider 2D.
Use Delaunay Mesh Enables Unity using a Delaunay triangulation algorithm to generate the collision shapes. Enabling this property can improve collision shapes for complex shapes, but can reduce performance.
Generation Type Select the geometry generation method used when either the Composite Collider 2D component changes, or when any of the colliders composing it change.
    Synchronous Select this to have Unity immediately generate new geometry when making a change to the Composite Collider 2D component or to any of the colliders composing it.
    Manual Select this to have Unity generate geometry only when you request it. To request generation, either call the CompositeCollider2D.GenerateGeometry scripting API, or select Regenerate Geometry in the Inspector window.
Vertex Distance Set a value for the minimum spacing allowed for any vertices gathered from the combined colliders. Unity removes any vertex closer than this limit. This allows control over the effective resolution of the vertex compositing.
Offset Distance Set the value to offset vertices when compositing multiple physics shapes. Unity combines any vertices between physics shapes within this distance value. Note: It’s recommended to not set this value higher than 1% of the Sprite’s length, as this can result in loss of detail when too many vertices combine together.
Layer Overrides Expand for the layer override settings.
    Layer Override Priority Sets the decision priority when this collision shape collides with another collision shape. Refer to its API documentation for more information.
    Include Layers Sets the layers this collision shape collides with. Refer to Collider2D-includeLayers.
    Exclude Layers Sets the layers this collision shape doesn’t collide with. Refer to Collider2D-excludeLayers.
    Force Send Layers Sets the layers this collision shape sends forces to during collisions. Refer to Collider2D-forceSendLayers.
    Force Receive Layers Sets the layers this collision shape can receive forces from during collisions. Refer to Collider2D-forceReceiveLayers.
    Contact Capture Layers Sets the layers of other Collider 2D components to capture during collisions. Refer to Collider2D-contactCaptureLayers.
    Callback Layers Sets the layers to report collisions or triggers with. Refer to Collider2D-callbackLayers.

Additional resources

CompositeCollider2D

Composite Collider 2D
Combine Colliders with the Composite Collider 2D