You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Enter a body of water.
Begin to descend.
Observe that breath is not tracked even when the surface of the water is above eye level.
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):
OS: Windows 10
Version 1.0.0
The text was updated successfully, but these errors were encountered:
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):
The text was updated successfully, but these errors were encountered: