# Sandbox.PhysicsBody.AddCapsuleShape

```csharp
PhysicsShape AddCapsuleShape(Vector3 center, Vector3 center2, float radius, bool rebuildMass = True)
```

Add a capsule shape to this body.

### Parameters

- `center` (`Vector3`): Point A of the capsule, relative to [Sandbox.PhysicsBody.Position](/api/Sandbox.PhysicsBody/Position) of this body.
- `center2` (`Vector3`): Point B of the capsule, relative to [Sandbox.PhysicsBody.Position](/api/Sandbox.PhysicsBody/Position) of this body.
- `radius` (`float`): Radius of the capsule end caps.
- `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.

Declared in [Sandbox.PhysicsBody](/api/Sandbox.PhysicsBody).
Assembly: `Sandbox.Engine`.
