Buoyancy testing

Just another one of those projects that got me curious and had to code it to see if it’d work.
Using the water shader from the last project - it looks pretty good :grin:

repo: https://github.com/Lumak/Urho3D-Buoyancy


Nice! Did you attach a constraint at the bottom of each object?

No, no constraint of any kind. Just applied Archimedes’ Principle and his buoyant force eqn.

Great! I had this thing on the back of my mind for so long! Never found the occasion to build it. Glad to see it can be done in urho!

created a repo, link on top of the page.


Cool stuff as usual, although I must say the water looks more like jello here :laugh:

Especially when it looks this delicious from the side.

updated repo: changed under water reflection and added smooth cam.
I think that’s the last of the updates, although, I found Rasterson’s underwater shader while googling under water distortion and that maybe a cool thing to add in the future.

nice share codes … God Bless You

Please add underwater stuff, that will help me understand how to do underwater location transition
(i.e. getting and exiting water and diving and moving under).

Only check required is:

if (waterBbox_.IsInside(cameraNode_->GetPosition()))

which checks to see if the cam is inside the water’s bbox.

This is awesome, playing around with it is cool as well. Great Work

Glad you’re enjoying it :slight_smile:

This is awesome! Great work!

Wow, thank you so much for sharing this! This is so awesome! I can learn so much from this!