# Sandbox.ModelBuilder.AddBody

```csharp
PhysicsBodyBuilder AddBody(float mass = 0, Surface surface = null, string boneName = null)
```

Adds a physics body to the model.
Joints refer to bodies by the order they are added.

### Parameters

- `mass` (`float`), default `0`: The mass in kilograms. A value of 0 calculates mass from the body's shapes and surface density.
- `surface` (`Surface`), default `null`: The surface properties applied to the body.
- `boneName` (`string`), default `null`: Optional name of the bone this body is attached to. Leave empty for non-skeletal bodies.

### Returns

`PhysicsBodyBuilder`: A builder for the new body.

Declared in [Sandbox.ModelBuilder](/api/Sandbox.ModelBuilder).
Assembly: `Sandbox.Engine`.
