Taos API Reference
    Preparing search index...

    Interface BuoyancyOptions

    interface BuoyancyOptions {
        probes?: readonly Vec3[];
        waterHeightAt?: (x: number, z: number) => number;
        waterLevel?: number;
        strength?: number;
        submergeDepth?: number;
        dragVertical?: number;
        dragLateral?: number;
    }
    Index

    Properties

    probes?: readonly Vec3[]

    Local-space probe offsets. When omitted, four probes are auto-placed at the corners of the sibling RigidBody's box footprint.

    waterHeightAt?: (x: number, z: number) => number

    World (x, z) → water surface height (y). Defaults to a flat sea at Buoyancy.waterLevel. Set this to the ocean's surface query.

    waterLevel?: number

    Flat-sea fallback height when no waterHeightAt is given. Default 0.

    strength?: number

    Buoyancy over-force. At rest the body settles where average submersion equals 1/strength, so values >1 keep it riding near the surface. Default 1.5.

    submergeDepth?: number

    Depth (m) over which a probe ramps from 0 to fully submerged — think of it as the probe's vertical thickness / the hull draft. Default 1.

    dragVertical?: number

    Vertical velocity drag while submerged (per probe). Higher = less bob. Default 1.2.

    dragLateral?: number

    Horizontal water resistance, applied at the body's center of mass (NOT at the probes — a lateral force below the COM would pitch the hull under at speed). Scales with the submerged probe fraction. Default 0.4.