# Sandbox.PhysicsBody.AddBoxShape

## Overload 1

```csharp
PhysicsShape AddBoxShape(Vector3 position, Rotation rotation, Vector3 extent, bool rebuildMass = True)
```

Add a box shape to this body.

### Parameters

- `position` (`Vector3`): Center of the box, relative to [Sandbox.PhysicsBody.Position](/api/Sandbox.PhysicsBody/Position) of this body.
- `rotation` (`Rotation`): Rotation of the box, relative to [Sandbox.PhysicsBody.Rotation](/api/Sandbox.PhysicsBody/Rotation) of this body.
- `extent` (`Vector3`): The extents of the box. The box will extend from its center by this much in both negative and positive directions of each axis.
- `rebuildMass` (`bool`), default `True`: Whether the mass should be [recalculated](/api/Sandbox.PhysicsBody/RebuildMass) after adding the shape.

### Returns

`PhysicsShape`: The newly created shape, or null on failure.

## Overload 2

```csharp
PhysicsShape AddBoxShape(BBox box, Rotation rotation, bool rebuildMass = True)
```

Add a box shape to this body.

### Parameters

- `box` (`BBox`)
- `rotation` (`Rotation`)
- `rebuildMass` (`bool`), default `True`

### Returns

`PhysicsShape`

Declared in [Sandbox.PhysicsBody](/api/Sandbox.PhysicsBody).
Assembly: `Sandbox.Engine`.
