# PhysicsBody.BuoyancyInput

> Input to PhysicsBody.ApplyBuoyancy describing the fluid surface, density, flow and damping used to compute buoyancy, flow and damping forces for the body.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.U2D.Physics](/engine/6000.6/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public struct PhysicsBody.BuoyancyInput
```

## Constructors

| Constructor                                                                                            | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [BuoyancyInput()](/engine/6000.6/script-reference/unity/u2d/physics/physicsbody/buoyancyinput/ctor.md) | Create a default [PhysicsBody.BuoyancyInput](/engine/6000.6/script-reference/unity/u2d/physics/physicsbody/buoyancyinput.md). The [\_mask](/engine/6000.6/script-reference/unity/u2d/physics/physicsbody/buoyancyinput/mask.md) defaults to [PhysicsMask.All](/engine/6000.6/script-reference/unity/u2d/physics/physicsmask/all.md) so every attached shape contributes unless explicitly filtered out. The surface defaults to a flat horizontal water surface at the world origin ([\_surfacePosition](/engine/6000.6/script-reference/unity/u2d/physics/physicsbody/buoyancyinput/surfaceposition.md) = [\_zero](/engine/6000.6/script-reference/unityengine/vector2/zero.md), [\_surfaceNormal](/engine/6000.6/script-reference/unity/u2d/physics/physicsbody/buoyancyinput/surfacenormal.md) = [\_up](/engine/6000.6/script-reference/unityengine/vector2/up.md)). |

## Properties

| Property                                                                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                |
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [angularDamping](/engine/6000.6/script-reference/unity/u2d/physics/physicsbody/buoyancyinput/angulardamping.md)   | Angular damping coefficient. Slows the body's angular velocity while submerged.                                                                                                                                                                                                                                                                                                            |
| [density](/engine/6000.6/script-reference/unity/u2d/physics/physicsbody/buoyancyinput/density.md)                 | The fluid density, used to compute the Archimedean buoyancy force per submerged unit area. Clamped to a lower bound of [Mathf.Epsilon](/engine/6000.6/script-reference/unityengine/mathf/epsilon.md).                                                                                                                                                                                      |
| [flowDirection](/engine/6000.6/script-reference/unity/u2d/physics/physicsbody/buoyancyinput/flowdirection.md)     | The direction of the fluid flow as a 2D rotation. Combined with [\_flowSpeed](/engine/6000.6/script-reference/unity/u2d/physics/physicsbody/buoyancyinput/flowspeed.md) to produce the flow velocity vector applied as force per unit submerged area at the submerged centroid.                                                                                                            |
| [flowSpeed](/engine/6000.6/script-reference/unity/u2d/physics/physicsbody/buoyancyinput/flowspeed.md)             | The magnitude of the fluid flow along [\_flowDirection](/engine/6000.6/script-reference/unity/u2d/physics/physicsbody/buoyancyinput/flowdirection.md). The per-shape force contribution is flowDirection " flowSpeed " submergedArea.                                                                                                                                                      |
| [linearDamping](/engine/6000.6/script-reference/unity/u2d/physics/physicsbody/buoyancyinput/lineardamping.md)     | Linear damping coefficient. Slows the body's linear velocity at the submerged centroid relative to the fluid.                                                                                                                                                                                                                                                                              |
| [mask](/engine/6000.6/script-reference/unity/u2d/physics/physicsbody/buoyancyinput/mask.md)                       | Category mask used to filter which attached shapes contribute. A shape participates iff (shape.contactFilter.categories.bitMask & mask.bitMask) != 0. Defaults to [PhysicsMask.All](/engine/6000.6/script-reference/unity/u2d/physics/physicsmask/all.md) when the input is created via the parameterless constructor.                                                                     |
| [surfaceNormal](/engine/6000.6/script-reference/unity/u2d/physics/physicsbody/buoyancyinput/surfacenormal.md)     | The outward-pointing surface normal of the fluid, in world space. Points away from the submerged side; shape points with a negative separation from the plane are submerged. Defaults to [\_up](/engine/6000.6/script-reference/unityengine/vector2/up.md) (a flat horizontal water surface). Must be non-zero; the engine normalises it internally so it does not need to be unit length. |
| [surfacePosition](/engine/6000.6/script-reference/unity/u2d/physics/physicsbody/buoyancyinput/surfaceposition.md) | A point in world space lying on the fluid surface. Together with [\_surfaceNormal](/engine/6000.6/script-reference/unity/u2d/physics/physicsbody/buoyancyinput/surfacenormal.md) this defines the infinite plane of the fluid.                                                                                                                                                             |
| [useTriggers](/engine/6000.6/script-reference/unity/u2d/physics/physicsbody/buoyancyinput/usetriggers.md)         | When true, trigger shapes contribute to buoyancy alongside solid shapes. When false, trigger shapes are skipped.                                                                                                                                                                                                                                                                           |
