Skip to content

Latest commit

 

History

History
10 lines (6 loc) · 619 Bytes

README.md

File metadata and controls

10 lines (6 loc) · 619 Bytes

Basic-Buoyancy

This is a very simple buoyancy script that you can add to objects that need floating.

Add this script to your floating objects, along with a rigidbody and a collider.

Add a series of floaters (empty gameobjects, children of your main mesh that are placed at strategic points) or simply use the object's own transform for simpler meshes.

Play with the different variables until you find values that work for your context. Enjoy !

Limitation : this only works for a flat body of water, but it should be pretty easy to implement with a wavy sea (I added a few comments in the script that might help)