Buoyancy Toolkit

  

Available now in the Unity Asset Store

Webplayer demo

About

Buoyancy Toolkit adds realistic buoyancy simulation to your Unity projects. Rigidbodies will float when submerged in fluid volumes with different densities and surface wave functions, such as water pools, oceans with large waves or air. The shape and volume of one or more connected colliders will be taken into account to let the geometry follow the waves realistically. Supports weighting for easy tweaking of the buoyancy behavior. 

Features

  • Realistic buoyancy simulation
    • Specify a wave function to introduce surface waves in the simulation
    • Weighting lets you fine-tune the buoyancy behavior on a per-object basis
    • Disable weighting and use realistic object properties (scale, mass, fluid density) to mimic real-life
  • Works well with other rigidbody forces
    • The BuoyancyForce script does not "take control" of a rigidbody, it only applies impulses
  • No scripting required
  • Works on mobile devices

Platforms

Unity 3/4 Free/Pro: Supported

Unity iOS/Pro: Supported on higher end devices (Tested on iPhone 4S)

Unity Android/Pro: Supported on higher end devices (Tested on LG Optimus 2X)

Mobile

To fine-tune the quality/performance of the buoyancy simulation, set the Quality property of a BuoyancyForce instance to Custom and then tweak the Samples property manually. The Samples property equals the number of points to sample per axis (X,Z) when calculating the buoyancy force. A lower Samples value trades quality for performance and vice versa.