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
Screen.field_of_view.horizontal returns values that are neither the player's FOV in degrees, nor the player's FOV in radians, nor the player's FOV in degrees * 360 / 512. In addition to that, as stated by treellama, that function tries to derive the FOV from the 3D view window.
Instead, a read-only variable in HUD Lua that takes the exact value of the player's FOV as set in the preferences would allow to automatically calculate the size of the 3D view to prevent landscape smearing or mirroring when looking far up or far down in certain conditions.
The text was updated successfully, but these errors were encountered:
Screen.field_of_view.horizontal returns the player's FOV in internal units, not degrees; that should definitely be fixed.
I think you do want the real FOV, since it will change when the player picks up an extravision or activates zoom. I made this change to Basic HUD to verify:
I'll change the Lua API to return the actual units, as I don't believe any HUD scripts use the field_of_view angles right now.
treellama
changed the title
[Feature Request] New read-only player's FOV variable in HUD Lua
HUD Lua returns field_of_view in internal angle units
Jun 5, 2024
Screen.field_of_view.horizontal returns values that are neither the player's FOV in degrees, nor the player's FOV in radians, nor the player's FOV in degrees * 360 / 512. In addition to that, as stated by treellama, that function tries to derive the FOV from the 3D view window.
Instead, a read-only variable in HUD Lua that takes the exact value of the player's FOV as set in the preferences would allow to automatically calculate the size of the 3D view to prevent landscape smearing or mirroring when looking far up or far down in certain conditions.
The text was updated successfully, but these errors were encountered: