Erasable Collider 2D
Use the Erasable Collider 2D component to create collision areas that can be drawn or erased in real time. Ideal for interactive effects like swiping to dig paths for flowing water in 2D game scenarios.

Add the Erasable Collider 2D Component
- Go to the Inspector panel
- Click the + Add Component button
- Go to 2D Physics
- Select Erasable Collider 2D
Properties
Property | Description |
---|---|
Resolution | Defines the level of detail or smoothness of the collider's path. The default value is 0.5. |
Enable Editing | When checked, allows you to edit the collider directly in the Scene panel |
Point X | Defines a corner or edge of the collider, and its position directly impacts the collider's shape. If you are in Edit Mode, the points' X and Y values automatically update |
Add Point | Button to add additional two-dimensional points |
Brush Size | Sets the brush size of the erasable collider |
Texture | Chooses the asset of the brush texture |
Texture UV Settings | When checked, this option allows you to set the Offset and Tiling. The default is (0,0) and (1,1) |
Custom Brush Location | When checked, this option sets a custom brush location. The default is (0,0) |
Physics Matter | Defines the physical properties of a collider, such as its friction and bounciness |
Is Tangible | When unchecked, the collider will not physically affect other colliders, but will still generate trigger events when another collider enters or exits its bounds. When checked, the collider will physically interact with other colliders, blocking their movement and generating collisions. This property is checked by default |
Show Collider | When checked, this option allows the box collider to become visible in the scene view, making it easier to visualize and adjust its position and size during the editing process |