Fluid-Actor Interactions (0.14.1 Alpha)


With this release, when Actors fall into a fluid, they'll now slow down to a maximum velocity based on the density of the fluid involved, but it doesn't happen all at once.  High velocity Actors will shed velocity a bit at a time until they match that maximum.  All of this happens in proportion to how much of the Actor is submerged.

Additionally, working on this today has given me a fun idea on how to modify this to make actors float on fluids, all based on density.  It's just a matter of producing a force based on the density difference and gravity.  It should be a cake walk.

I also found a better way to handle Actors passing through the underside of platforms, so the little push the platform gives the Actor should be much more minimal.

Here's an animated gif of some balls falling into water (sorry for the large file size!):


Files

bigblockengine-win-linux-osx-alpha.zip 12 MB
Version 0.14.1-Alpha Dec 25, 2018
bigblockengine-source.zip 3.6 MB
Version 0.14.1-Alpha Dec 25, 2018

Get Big Block Engine

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

(1 edit)

Having worked on that "cake walk" for a few hours, I can say, yes, I can get it to work.  However, I'm not sure I can ever make it work in a stable fashion, plus very low density fluid ejected actors at ridiculous speeds.  So...never mind.

The other approach I might try would be based on propelling actors to the surface using the collision forces already built into dyn4j, but for that I've got to figure out the walking on water feature.  So, probably eventually, but not now.