February - March 2022
- Language: C#
- Technology: Unity (v2021.2.6f1)
A buoyancy system for varying shapes inside Unity, built on top of the existing physics system for compatability with other systems.
Each object that can float has a list of points to check if submerged. The floating script checks each of these points individually for how deep below the water they are and applies force towards the surface, scaling with depth below the surface.
Only the rigidbody's mass is taken into account. If each buoyancy point of an object had a weight for how much it affects the buoyancy
this could improve the overall look and feel of the system.
I am very happy with how this system turned out and may look into integrating it into a future project.