Water refraction simulation

Hello fellow developers,
Just wondering if there was a way to create water refraction is Roblox, perhaps using Snell’s Law.
There was a similar thread posted in Platform Feedback, however the thread is now two years old and the engine’s computing power has hopefully increased.
Note that this does not need to be complex, just looking to test a concept using beams.
I’ve tried using raycasts but as I was constructing the script, I ran into some unreplicatable errors and the place became corrupted due to unrelated reasons, screenshots are not available.

Thanks in advance.

2 Likes

What errors were you having with raycasts? I would think that would be the best way to test stuff like this.

I don’t think that would help, as my friend inserted plenty of free models that contained viruses, what I though was the script may not be it as I didn’t check :sweat_smile:

Looks like we’re going to have to start from scratch.

If you want a base, I’d suggest looking at this. You can take the information in this and theoretically apply Snell’s law to create refraction instead of just reflecting.

If they are only free models and not plugins, the damage is fixable by just removing them. Only plugins and the command line are capable of adding/removing instances outside the game.

The file was corrupted anyway, and I developed it offline. Don’t worry, it’s fine.