how to implement reallistic buoyancy physics?

Started by
2 comments, last by Dirk Gregorius 1 year, 7 months ago

Hello, Im new to game development and am trying to make a BadPiggies' like game with water and buoyancy physics but I am a bit confused about the physics of buoyancy and what makes things buoyant,sink or submerge

there are different definitions about buoyancy force like :the displaced amount of water,difference of up and down pressure,difference of density,etc.

first I thought about treating water like springs that push what ever causes them to compress but when talking about objects that players make with blocks that have constant mass and volume that are connected to each other and the relative forces between them things get complicated

I read somewhere that the buoyancy force doesnt change with depth but how is that possible eventhough the pressure changes with depth ? how a box or plane shaped thing floats but a vertical pillar made of exactly the same mass sinks?

Is it okay to keep with the Idea of springy-water and implement physics based on that or is there a better idea?

thanks for the time you spent to read this ?

Advertisement

Found a great explanation about how submarines work here

Erin Catto wrote a very good article about this in Game Programming Gems 6. You might find it online these days. The source code is available from his Box2D site here (bottom of the page):

https://box2d.org/publications/

This topic is closed to new replies.

Advertisement