How can I give an object buoyancy?

I want an object to float on water and when you tap and hold the object will sink down, but then when you let go it’ll shoot back up to the surface, realistically and fluently.

Any examples of this? How can I go about this?

You can just increase the Y position of the object when the mouse/touch is down and decrease it while the object position is greater than the surface of the water and mouse/touch is NOT down. You can also change the angle of the object accordingly.

As it happens I was working on something along those lines… So I made a small example… You can check it out here where you drag the ball either in the air or in the water and see what happens…

I also zipped the GD4 file here if it is of any help… It will be much easier to see it that to explain… (222 KB)

1 Like