# Sandbox.Rigidbody.ApplyBuoyancy

## Overload 1

```csharp
void ApplyBuoyancy(Plane plane, float dt)
```

Applies buoyancy and drag to the rigidbody relative to a plane to simulate things floating in water.

### Parameters

- `plane` (`Plane`)
- `dt` (`float`)

## Overload 2

```csharp
void ApplyBuoyancy(Plane plane, float fluidDensity, float linearDrag, float angularDrag, Vector3 fluidVelocity, float dt)
```

Applies buoyancy and drag to the rigidbody relative to a plane to simulate things floating in water.

### Parameters

- `plane` (`Plane`)
- `fluidDensity` (`float`)
- `linearDrag` (`float`)
- `angularDrag` (`float`)
- `fluidVelocity` (`Vector3`)
- `dt` (`float`)

Declared in [Sandbox.Rigidbody](/api/Sandbox.Rigidbody).
Assembly: `Sandbox.Engine`.
