Camera FOV rework - #3139
Draft
ohlidalp wants to merge 3 commits into
Draft
Conversation
Changes: * cvar `gfx_camera_speed` replaces `CameraManager::m_cam_ratio` which was used/updated chaotically and didn't always account frame time. Default value is 4.0 like before. * New `smoothXXX()` helpers to CameraManager, replacing copypasted smoothing code. * Clarified staticcam fov exponent smoothing: Removed `Cameramanager::m_staticcam_fov_exponent` which just duplicated `gfx_static_cam_fov_exp`. Added `Cameramanager::m_staticcam_fov_exp_current` which replaces `static fovExp` (CameraManager.cpp, line 789). Comments clearly indicate what is what.
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

With this ticket I try to clear some confusion about adjusting FOV and the meaning of the slider(s) in Top Menubar UI.
The slider is actually context sensitive; We have multiple presets:
gfx_static_cam_fov_exp~ (smooth) ~ A "zoom factor" of static camera (the actual FOV is dynamic based on distance); Adjust by 'Ctrl+mouse wheel' or TopMenubar/Settings.gfx_fov_internal~ (stepped) ~ FOV of cinecam; Adjust by hotkeys EV_COMMON_FOV_{LESS/MORE/RESET}.gfx_fov_external~ (stepped) ~ FOV of exterior cameras (3rd person, free cam, freefixed cam), adjustable by hotkeys. EV_COMMON_FOV_{LESS/MORE/RESET}.To start this off, I clarified and commented the code in Top Menubar (as well as related CameraManager code), and I added a combobox to select camera mode:

Note: having FOV stepped in whole numbers is sort of a convention; thing is, angle degrees aren't typical (base 10) numbers but base 60 numbers, meaning 1 Degree = 60 Angular Minutes. Using a
floatto represent FOV in degrees would be kind of bastardized, but I think I'll do it anyway.