Skip to content

Fix FOV Slider + Viewmodel#975

Open
jvnpr wants to merge 12 commits intosmartcmd:mainfrom
jvnpr:main
Open

Fix FOV Slider + Viewmodel#975
jvnpr wants to merge 12 commits intosmartcmd:mainfrom
jvnpr:main

Conversation

@jvnpr
Copy link

@jvnpr jvnpr commented Mar 8, 2026

Description

This PR fixes the FOV slider to use the pre-existing FOV option as intended instead of hooking into gameRenderer. It also fixes some other minor issues with the existing FOV system and increases the range of FOV to 30-110.

Changes

Previous Behavior

The FOV slider was inaccurate because it modified a value gameRenderer expected to be hardcoded.

java110 lcenightlybuild110

Additional Issues:

  • FOV slider is not 1:1 with FOV values
  • Hand viewmodel is affected by FOV changes

Root Cause

The FOV slider implemented by 4J in the debug menu (which was used as a reference for the slider in settings) modified the m_fov value in gameRenderer instead of modifying the existing option.

The FOV slider was also implemented as a 0-100 slider and the value was used to calculate an FOV, meaning that multiple stops of the slider corresponded with a single FOV value

The hand renderering code calls for the target FOV, meaning it is affected by FOV scaling.

New Behavior

The FOV slider now modifies the intended option value that gameRenderer expects it to. The FOV slider also now goes from 30-110 instead of 70-110.

java110 fovtweak110 java30 fovtweak30

The FOV slider is now 1:1, with each tick / stop corresponding to one discrete FOV value.

The hand viewmodel no longer scales with screen FOV.

Fix Implementation

Instead of using gameRenderer->SetFovVal();, the slider now modifies options->fov. This change is used in UIScene_SettingsGraphicsMenu.cpp, UIScene_DebugOverlay.cpp, and Consoles_App.cpp.

Changed how m_sliderFOV was implemented, making it 0-80 to match the range of 30-110

Added a hardcoded value into gluPerspective(); in GameRenderer::renderItemInHand();

AI Use Disclosure

No AI was used to modify the code or author this pull request.

Related Issues

@jvnpr jvnpr changed the title Fix FOV Slider Fix FOV Slider + Viewmodel Mar 8, 2026
@codeHusky
Copy link
Collaborator

Tests fine, but resets FOV to 30 if you have existing settings prior to this change. Pls fix and then should be good to merge

@jvnpr jvnpr marked this pull request as ready for review March 9, 2026 10:03
@jvnpr jvnpr marked this pull request as draft March 9, 2026 10:10
@jvnpr
Copy link
Author

jvnpr commented Mar 9, 2026

gotta fix some default setting after the merge resolution

@jvnpr jvnpr marked this pull request as ready for review March 9, 2026 10:46
@loinmin
Copy link

loinmin commented Mar 9, 2026

oh cool :0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Hand FOV changes when the FOV is changed in graphics settings

3 participants