Legacy Documentation: Version 4.6.2
Language: English
Polygon Collider 2D
Physics Material 2D

Edge Collider 2D

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Scripting

The Edge Collider 2D component is a collider for use with 2D physics. The collider’s shape is defined by a freeform edge made of line segments, so you can adjust it to fit the shape of the Sprite graphic with great precision. Note that this collider’s edge need not completely enclose an area (unlike the similar Polygon Collider 2D) and can be as simple as a straight line or an L-shape.

Property: Function:
Material A physics material that determines properties of collisions, such as friction and bounce.
Is Trigger Does the collider behave as a trigger?
Collider Info Non-editable information about the complexity of the generated collider.

Details

You can edit the polyline directly by holding down the shift key as you move the mouse over an edge or vertex in the Scene view. You can move an existing vertex by shift-dragging when the mouse is over that vertex. If you shift-drag while the mouse is over an edge then a new vertex will be created at the mouse location. You can remove a vertex by holding down the ctrl/cmd key while clicking on it.

Note that you can hide the outline of the 2D move gizmo while editing the collider - just click the foldout arrow on the Sprite Renderer component in the Inspector to collapse it.

Polygon Collider 2D
Physics Material 2D