Simple water physics engine

Today, I have made a simple water physics engine that uses roblox’s terrain water.

Please give feedback on how I can improve!

5 Likes

Oh wow, it looks pretty nice! I would love to know how made this. My guess is you used spheres and are using the :FillBall() Terrain method as the ball moves. The bounce can be simulated using a simple momentum equation.

Did I get it right?

1 Like

You are definitely correct about the :FillBall() function! But I have labelled this as a really simple engine as it cant do the things that a regular cup of water can do! Such as going through multiple small holes and spilitting and reconnecting. I might as well after making this engine more accurate and optmised to turn it into a module.

1 Like

Well, splitting will be limited as roblox can only fill 4x4x4 terrain voxels.

1 Like

We definitely cant but, we can make an effect that LOOKS like it by checking for holes in the game and if there is, make all objecrs around that hole non collideable for the water droplet.

1 Like