Open ohlidalp opened 3 months ago
I got curious if I could change water type in-game by simply destroying the water subsystem and initing it again. Well, it works. Also waves are now toggleable there, that was already possible before just the UI was missing. Note the HydraX options only show up when HydraX is active.
I've bumped this PR with one small fix. I couldn't fix the glitch but I got closer, see https://github.com/RigsOfRods/rigs-of-rods/issues/3137#issuecomment-2198713608
I tried to investigate #3137 but got nothing. So I at least analyzed the water code and added UI for tweaking HydraX water.
Both basic water with waves and HydraX water boil down to the same thing: a dynamic grid-mesh updated in code. The only major difference is how the waves are calculated: Basic uses configurable "wave trains", HydraX uses Perlin noise with adjustable params (via .hdx config file). Since both systems are in our codebase, it would make sense to unify them. To better understand how the system operates, I added the UI.