Sin wave cycle skipping when world resets
Hello friends,
Please forgive me if this question isn't presented correctly in any way.
I am creating an ocean of waves using sine based off a world position using a combination of these two excellent tutorials:
https://www.habrador.com/tutorials/unity-boat-tutorial/4-waves-endless-ocean/ and https://catlikecoding.com/unity/tutorials/flow/waves/
I have a player ship which, when it reaches a certain distance from zero, resets itself and the surrounding map to near zero to avoid floating point issues using this script:
https://wiki.unity3d.com/index.php/Floating_Origin
When this happens the waves skip, as I'm guessing the floating point reset causes them to be out of sync, or to jump a few steps in their cycle. I have looked at a lot of sine stuff in an attempt to understand what is happening and think the solution might have something to do with phase shifts or phase distance but sadly my meagre grasp of maths blames teachers has left me a bit stranded. Can anyone help make the wave transition smooth?
Thanks in advance for your time