Buoyancy
Last updated
Last updated
Support us as a and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude. These articles are made possible by our ... become a sponsor today!
Found in namespace:
This API is used to calculate the effective buoyancy force applied to a body given that bodies physics data and information about the environment its in.
Put more simply we can use this to make things float.
The main function of this API is to calculate the buoyancy effect. That is to tell us how much force is being applied counter to gravity. Note we don't need to know what direction that is only how strong the effect is we can then use that information along with other physics data to simulate a floating object.
Effect can be calculated in three ways
A simpler and generally more stable method for most use cases is:
The final method is the simplest but makes the most assumptions.
This expects you to provide it with the volume of the geometry submerged and the density of the environment the body is in.
Finds the volume of the provided mesh that is displacing the target surface volume.
This is the most complex method and pulls hull information from the provided to test each vertex point giving a reasonably accurate estimate on the submerged volume. You can use the submergedPoints returned and the ratio of the total submerged volume to distribute the applied force across the subject. This is the method used by the when in complex mode.