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 = value
world.camera.updateProjectionMatrix()
UI Integration
Player Camera Synchronization
lateUpdate
methodFiles 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.