Tidal 2 URP
New in v2.0

Buoyancy

Float-point rigidbody buoyancy with drag, flow push, wave slide, and stabilisation.

TidalBuoyancy is a generic float-point buoyancy component for any Rigidbody - crates, buoys, debris, or boats. Attach it to the rigidbody and assign 3-4 Float Points (empty child transforms placed around the hull). Each point samples the live water surface and applies uplift, and the component swaps air/water drag, pushes with the flow field, slides down steep waves, and stabilises roll and pitch. It is pure physics - no input or camera logic. If no body is assigned it auto-binds to the first registered water body.

Fields

Field Type · Default Description
Connected Rigid Rigidbody The rigidbody to float. Auto-grabbed from the same GameObject when empty.
Using Tidal Body TidalBody Water body to float on. Empty = the first registered body.
Float Points Transform[] Sample/force points (empty child transforms around the hull; 3-4 typical).
Ignore Volumes List<TidalVolume> Volumes excluded from this object's height queries (assign the boat's own displacement volume here, if any).
Max Submerge Depth m · 1 Depth at which a point counts as fully submerged.
Waterline Offset m · 0.3 How far below the surface the body rests.
Buoyancy Factor ×gravity · 5 Uplift per point, in multiples of gravity.
Center Of Mass Offset Vector3 · (0, -0.5, 0) Shifts the center of mass for stability.
Roll Damping float · 1 Damps roll for stability.
Pitch Damping float · 1 Damps pitch for stability.
Air Drag float · 0.1 Linear drag while out of water.
Air Angular Drag float · 0.05 Angular drag while out of water.
Water Drag float · 1.5 Linear drag while in water (swapped automatically on entering/leaving water).
Water Angular Drag float · 1 Angular drag while in water.
Flow Push Strength float · 350 Per-point push toward the local current. Relative-velocity form: the object drifts up to current speed but never accelerates forever; uneven flow across the hull turns it.
Wave Slide Strength 0-3 · 1 Down-slope gravity component on steep waves.
Wave Slide Sample Dist m · 1.5 Slope-sampling half-spacing for the wave slide.

Public API

bool IsInWater - true when any float point was submerged on the last physics step.

Built-in failsafes (v2.0)
  • Invalid water-height samples (outside a bounded body, or before the physics field's first readback) contribute no force.
  • A non-finite or runaway rigidbody pose is restored to the last valid pose with motion zeroed and a one-time warning.
  • Together these prevent physics spiralling into Unity "Invalid worldAABB" errors.
Tip: TidalBuoyancy handles only the physics. The demo BoatController layers engine, steering, and camera on top of it - keep gameplay logic in your own controller and let the buoyancy component ride the water.