Improve first-time Looks menu face framing
Replace ineffective third-person zoom with FOV narrowing (40°) to magnify the character's face for easier facial-feature editing. Center the player on the fixed LooksMenu camera's optical axis for the first few polls to prevent off-center framing caused by the camera not being perfectly aimed at the player. Capture and restore FOV and player transforms on menu open/close. Add diagnostic logging to track camera position, player position, and menu camera behavior.
This commit is contained in:
@@ -6274,3 +6274,71 @@ Fixed the first-time character customization close path so the third-person came
|
||||
|
||||
### Next Steps
|
||||
- Run first-time join through Vault 109, close LooksMenu, then confirm camera offset and movement controls before and after SPECIAL closes.
|
||||
|
||||
---
|
||||
|
||||
## 2026-06-28 - Looks menu face close-up via FOV
|
||||
|
||||
### Summary
|
||||
Replaced the ineffective third-person zoom approach for first-time LooksMenu face framing with a narrow camera FOV that magnifies the face, then restores the original FOV when LooksMenu closes.
|
||||
|
||||
### Files Changed
|
||||
- `plugin/src/F4TSessionLaunch.cpp`
|
||||
- `changelog.md`
|
||||
- `docs/dev-log.md`
|
||||
|
||||
### Details
|
||||
- Discovery: the Fallout 4 LooksMenu uses its own fixed camera, not the third-person camera. Writing `ThirdPersonState` zoom/shoulder/height offsets has no visual effect because that state is not active during LooksMenu and the game re-updates the camera every frame. Confirmed against the `LooksmenuPlayerRotation` mod, which never moves the camera and instead repositions the actor in front of a fixed, frozen camera.
|
||||
- Reverted the no-op zoom/height tweak (`kLooksMenuFaceCameraZoomOffset` back to `-90.0`, removed the height adjust) since it cannot change the LooksMenu view.
|
||||
- Added FOV-based zoom: on first LooksMenu-open detection, capture current world/first-person FOV, then issue console `fov 40` to narrow the field of view and enlarge the face.
|
||||
- Re-assert the narrow FOV during the existing camera-nudge polls so the menu cannot revert it.
|
||||
- On LooksMenu close (and on reset/retry paths), restore the captured FOV via `fov <firstPerson> <world>`.
|
||||
|
||||
### Testing
|
||||
- Not run in this session (Fallout 4/F4SE runtime not available in this environment).
|
||||
- Expected manual check: start a first-time server join from the main menu, wait for LooksMenu to open in Vault 109, and confirm the face now fills much more of the screen (visible zoom-in) compared to before.
|
||||
- Confirm that after closing LooksMenu the FOV returns to normal before SPECIAL opens, and that movement/gameplay FOV is unchanged afterwards.
|
||||
- Check `CommonwealthOnline.log` for `Captured FOV before face-edit zoom` and `Restored FOV after face-edit zoom`.
|
||||
|
||||
### Known Issues
|
||||
- The close-up amount is a fixed FOV (`kLooksMenuFaceCameraFOV = 40`); it is a telephoto zoom rather than a physical dolly-in, so perspective is slightly flattened.
|
||||
- FOV is applied via the console `fov` command (affects both first- and third-person FOV while open); it is restored on close, but an abnormal exit before restore would leave a narrowed FOV until the next launch flow restores it.
|
||||
|
||||
### Next Steps
|
||||
- If a stronger/weaker close-up is wanted, tune `kLooksMenuFaceCameraFOV`.
|
||||
- If a true physical dolly-in is preferred, implement the actor-reposition approach used by `LooksmenuPlayerRotation` (capture fixed camera pos/angle, move the player closer in front of it, snapshot/restore player position).
|
||||
|
||||
---
|
||||
|
||||
## 2026-06-28 - Center player in LooksMenu
|
||||
|
||||
### Summary
|
||||
The FOV zoom worked but magnified the LooksMenu camera's existing horizontal offset, leaving the face pushed to one side of the screen. Added player-centering so the character sits on the camera's optical axis.
|
||||
|
||||
### Files Changed
|
||||
- `plugin/src/F4TSessionLaunch.cpp`
|
||||
- `changelog.md`
|
||||
- `docs/dev-log.md`
|
||||
|
||||
### Details
|
||||
- Because the LooksMenu camera is fixed and not aimed exactly at the player, narrowing the FOV amplified the off-center framing.
|
||||
- Adopted the actor-reposition technique from `LooksmenuPlayerRotation`: capture the fixed camera world position (`PlayerCamera::GetCameraPosition`) and yaw (`PlayerCamera::heading`) once, then place the player on the camera's forward axis.
|
||||
- Centering preserves the player's straight-line distance to the camera (so the existing zoom level is unchanged) and faces the player back toward the camera for a front-on view.
|
||||
- Centering runs only for the first `kLooksMenuCenterMaxPolls` (6) polls after LooksMenu opens (handles camera settle), then stops so the menu's own model rotation/controls work normally.
|
||||
- Snapshots the player's pre-LooksMenu position and angle and restores them when the menu closes (and on reset/retry paths), so post-customization gameplay starts at the original spawn marker.
|
||||
- Used `Actor::SetPosition`, `TESObjectREFR::SetAngleOnReference`, and `Update3DPosition` for the move; vertical (Z) position is left unchanged.
|
||||
|
||||
### Testing
|
||||
- Not run in this session (Fallout 4/F4SE runtime not available in this environment).
|
||||
- Expected manual check: start a first-time server join, wait for LooksMenu in Vault 109, and confirm the face is now centered (not pushed to the right) and facing the camera, with the same zoom level.
|
||||
- Confirm the player can still rotate the model via the menu after the first ~1.5s of auto-centering.
|
||||
- Confirm the player returns to the original spawn position after LooksMenu closes and before SPECIAL opens.
|
||||
- Check `CommonwealthOnline.log` for `Captured player transform before LooksMenu centering` and `Restored player transform after LooksMenu centering`.
|
||||
|
||||
### Known Issues
|
||||
- Centering relies on `GetCameraPosition(..., true)` returning the camera's world position and on `PlayerCamera::heading` being the camera yaw; if framing is wrong in-game, the yaw source/sign or distance may need adjustment.
|
||||
- Vertical framing is not adjusted; if the face sits too high/low, a Z offset can be added.
|
||||
- If the camera is still settling when captured on the first poll, centering may be slightly off; increasing `kLooksMenuCenterMaxPolls` or delaying the first capture would help.
|
||||
|
||||
### Next Steps
|
||||
- Verify in-game and tune `kLooksMenuCenterMaxPolls` / add a vertical offset if needed.
|
||||
|
||||
Reference in New Issue
Block a user