In the gif above, you can see a part given Density 0.2 via CustomPhysicsProperties. This causes the object to float on water as expected, but in addition to that I’d like the object to oscillate up and down with the waves. It can stay in the same place (it doesn’t need to get swept away by the current).
My goal is to create a buoy that appears to be floating in the ocean, like the below gifs:
The waves are just a visual effect and do not affect anything, so its impossible to precisely move the buoy up and down. The best thing you can do is to animate it going up and down, in most cases it looks good enough if you match the timing of the waves.
Is it possible to tie into the shader or whatever Roblox is doing to generate that visual effect via a script. For example something like “terrain.GetWaveHeight(x, z)”?
However it isn’t accurate when you stray away from 0,0,0 and falls out of sync after a while. It is better than nothing, but you’ll have to try and account for any inconsistencies which is difficult.