Open John-Leitch opened 8 months ago
There's one more related issue. When you are on the surface, the green filter still applies, like you're still under water.
Looking at the code and experimenting with some changes, these appear to be two similar, but distinct issues. The breathing issue is caused by a multiplier of the player y position in PlayerEnterExit.Update
, while the underwater issue is caused by a multiplier of the same in UnderwaterFog.UpdateFog
. While I haven't tested the fix enough to send a PR out, I believe the breathing problem should be an easy fix.
However, the fog issue is going to be a little more complicated. I tested some changes to the modifier and managed to make the fog present when the player is just below the surface, and gone when above:
However, when swimming as high as possible, the camera is not entirely above the water.
And looking down, the player is able to see into the water with no fog.
Describe the issue
The calculations for when a player begins holding their breath appear to be slightly off. In some cases, the player is not considered underwater even when the surface of the water is above eye level.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The player should be considered underwater sooner, probably when eye level is below the surface.
Screenshots and Logs
And a little bit further down:
Desktop (please complete the following information):