# Circle Collider 2D

> Aego 0.12.5 · development; docs build `4a32b816933e02930662f6a443cb25abe6050d090c55e237cbff5c44ae9b25f8`. [Build manifest](/docs-build.json).

```
component physics.CircleCollider2D
```

Circle shape. Needs a uniform node scale.

## From a script

Make a ball bouncier every time it lands, up to a limit.

```aes check
package game

import (
    "aego/math"
    "aego/physics"
)

script Bouncy {
    func OnCollisionEnter(other NodeRef, contact physics.Contact) {
        c := node.Get<CircleCollider2D>()
        c.Restitution = math.Min(c.Restitution+0.1, 0.9)
    }
}
```

## Fields

| Name | Script name | Type | Default | Description |
|---|---|---|---|---|
| Offset | `Offset` | `Vec2` | `(0, 0)` | Position of the shape in node space. |
| Is Trigger | `IsTrigger` | `bool` | `false` | Detects overlaps and sends trigger events without pushing bodies apart. |
| Friction | `Friction` | `float` | `0.6` | Resistance to sliding along other shapes; 0 is ice. Two shapes use the square root of the product. |
| Restitution | `Restitution` | `float` | `0` | Bounciness: 0 stops on impact, 1 bounces back at the same speed. Two shapes use the larger value. |
| Density | `Density` | `float` | `1` | Mass per square unit; gives the body its mass when Mass Mode is auto. |
| Radius | `Radius` | `float` | `0.5` | Radius in units, before the node scale. |
