Fov#108
Draft
jb0gie wants to merge 3 commits intohyperfy-xyz:mainfrom
Draft
Conversation
…a handling in ClientControls
…d improve FOV display updates
Contributor
|
Good idea, but the PR has a bunch of weird changes and files in it so can't merge. I'm not sure about having a world setting, this should just be set to something that is ideal, and then apps can override it for things like gun scopes or binoculars etc. Additionally when changing control.camera.fov it should interpolate toward this value smoothly, the same way control.camera.zoom does. What do you think? |
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.
Description
This PR implements Field of View (FOV) as a core feature in Hyperfy, allowing users to adjust their camera field of view through the settings interface. The FOV setting is now available in both the SettingsPane and MenuMain components, with proper server-side synchronization and camera integration.
Key Changes:
world.settings.set(fov, value, true)Type of Change
Testing
Implementation Details
Server-Side Settings Integration
world.settings.fov(server-side)world.settings.set('fov', fov, true)Camera Integration
world.camera.fov = valueworld.camera.updateProjectionMatrix()UI Integration
Player Camera Synchronization
lateUpdatemethodFiles Changed
Core Implementation
src/core/entities/PlayerLocal.js- Added FOV synchronizationsrc/core/systems/ClientControls.js- FOV settings change handlingsrc/core/systems/Settings.js- Server-side FOV propertyUI Components
src/client/components/SettingsPane.js- Added FOV setting with range slidersrc/client/components/MenuMain.js- Added FOV setting with range slidersrc/client/components/Sidebar.js- Added FOV setting with number inputsrc/client/components/ContextMenu.js- Temporarily hidden for PR focusBreaking Changes
None - this is a purely additive feature that doesn't break existing functionality.
Additional Notes
Screenshots
FOV setting now appears in:
The FOV setting properly integrates with the existing settings system and provides immediate visual feedback when adjusted.