Skip to content

Documentation / scene / FloatingBodyOptions

Interface: FloatingBodyOptions ​

Defined in: libs/scene/src/utility/buoyancy.ts:204

Options for FloatingBody, on top of those of BuoyancyVolume.

Extends ​

Properties ​

size ​

size: Vector3

Defined in: libs/scene/src/utility/buoyancy.ts:30

Full extents of the hull in metres, in its local axes.

Inherited from ​

BuoyancyVolumeOptions.size


mass? ​

optional mass?: number

Defined in: libs/scene/src/utility/buoyancy.ts:35

Mass in kilograms. Sets the lift the fully submerged hull produces; the float height does not depend on it. Defaults to 1000.

Inherited from ​

BuoyancyVolumeOptions.mass


submergedFraction? ​

optional submergedFraction?: number

Defined in: libs/scene/src/utility/buoyancy.ts:40

Share of the hull's height below the waterline at rest, which is its density relative to water. Lower floats higher. Defaults to 0.5.

Inherited from ​

BuoyancyVolumeOptions.submergedFraction


probeColumns? ​

optional probeColumns?: number

Defined in: libs/scene/src/utility/buoyancy.ts:42

Probes across the local X axis. Defaults to 3.

Inherited from ​

BuoyancyVolumeOptions.probeColumns


probeRows? ​

optional probeRows?: number

Defined in: libs/scene/src/utility/buoyancy.ts:44

Probes across the local Z axis. Defaults to 3.

Inherited from ​

BuoyancyVolumeOptions.probeRows


probeLayers? ​

optional probeLayers?: number

Defined in: libs/scene/src/utility/buoyancy.ts:46

Probes up the local Y axis. Defaults to 3.

Inherited from ​

BuoyancyVolumeOptions.probeLayers


gravity? ​

optional gravity?: number

Defined in: libs/scene/src/utility/buoyancy.ts:48

Gravity in metres per second squared. Defaults to STANDARD_GRAVITY.

Inherited from ​

BuoyancyVolumeOptions.gravity


node? ​

optional node?: SceneNode

Defined in: libs/scene/src/utility/buoyancy.ts:206

Node to drive, or null to read FloatingBody.position and FloatingBody.rotation directly.


linearDamping? ​

optional linearDamping?: number

Defined in: libs/scene/src/utility/buoyancy.ts:208

Fraction of linear velocity shed per second in water. Defaults to 2.5.


angularDamping? ​

optional angularDamping?: number

Defined in: libs/scene/src/utility/buoyancy.ts:210

Fraction of angular velocity shed per second in water. Defaults to 3.


airLinearDamping? ​

optional airLinearDamping?: number

Defined in: libs/scene/src/utility/buoyancy.ts:212

The same, clear of the water. Defaults to 0.05.


airAngularDamping? ​

optional airAngularDamping?: number

Defined in: libs/scene/src/utility/buoyancy.ts:214

The same, clear of the water. Defaults to 0.1.

Released under the MIT License.