8c1cf9be36
Work-Package: M02-RND-CAMERA-001
91 lines
3.7 KiB
Markdown
91 lines
3.7 KiB
Markdown
# M02-RND-CAMERA-001 — Third-person camera rig boundary
|
|
|
|
<!-- OPENWC_CLAIM:M02-RND-CAMERA-001:sindo-main-codex:2026-07-16 -->
|
|
|
|
## Ownership
|
|
|
|
- Target: M02
|
|
- Program: RND/GMP
|
|
- Owner/Agent ID: sindo-main-codex
|
|
- Branch: `work/sindo-main-codex/m02-camera-rig`
|
|
- Lease expires UTC: 2026-07-16
|
|
- Integrator: M02 milestone integrator
|
|
|
|
## Outcome
|
|
|
|
Move mouse capture, orbit yaw/pitch, zoom state and Camera3D transforms from
|
|
`ThirdPersonWowController` into a reusable `ThirdPersonCameraRig`, with an
|
|
explicit replaceable camera-collision policy that preserves the current
|
|
no-collision sandbox baseline.
|
|
|
|
## Non-goals
|
|
|
|
- Enable a new collision/raycast behavior before build-12340 comparison.
|
|
- Change initial yaw/pitch, zoom limits, sensitivity, FOV, far plane or camera path.
|
|
- Implement first-person, follow lag, shoulder offsets or cinematic cameras.
|
|
- Change movement, terrain query, character presentation or renderer streaming focus.
|
|
- Mark M02 complete or edit its checklist/Evidence.
|
|
|
|
## Paths
|
|
|
|
- Exclusive: `src/scenes/player/third_person_camera_rig.gd`,
|
|
`src/scenes/player/camera_collision_policy.gd`,
|
|
`src/scenes/player/no_camera_collision_policy.gd`,
|
|
`src/tools/verify_third_person_camera_rig.gd`,
|
|
`docs/modules/third-person-camera.md`, this claim
|
|
- Shared/hotspots: `src/scenes/player/third_person_wow_controller.gd`,
|
|
runtime streaming scenes, player regression scene,
|
|
`src/tools/verify_player_input.gd`, `docs/modules/player-input.md`,
|
|
`docs/modules/local-player-movement.md`, `docs/modules/README.md`
|
|
- Generated/ignored: local `.godot`, native DLL, generated resources and renderer corpus
|
|
|
|
## Contracts and data
|
|
|
|
- Public API: `ThirdPersonCameraRig.initialize_for_character`,
|
|
`handle_camera_input`, `godot_world_flight_movement_basis`, state getters and
|
|
`set_collision_policy`
|
|
- Policy: `CameraCollisionPolicy.resolve_camera_distance`; default
|
|
`NoCameraCollisionPolicy` returns requested distance unchanged
|
|
- Scene paths and renderer camera path remain unchanged
|
|
- Schema/cache/coordinate contracts: unchanged
|
|
- Consumers: player composition, sandbox flight movement and renderer viewport
|
|
|
|
## Dependencies
|
|
|
|
- Requires: merged TerrainQuery package on master `f5bb64e`
|
|
- Blocks: character appearance/animation extraction from remaining player hotspot
|
|
- External state: none; tests use asset-free camera/player scene
|
|
|
|
## Verification
|
|
|
|
- Commands: dedicated orbit/zoom/clamp/policy verifier, input/movement/terrain
|
|
regressions, asset-free scene, coordinate/StreamingFocus gates, renderer dry-run
|
|
and repository gates
|
|
- Fixtures: initial state, remappable action events, mouse deltas and fixed-distance policy
|
|
- Fidelity evidence: preserve current `-18°` pitch, `8` distance, `1` zoom step,
|
|
`2..18` clamp, `0.003` sensitivity and no-collision output
|
|
- Performance budget: constant-time state/transform update; no raycast in baseline policy
|
|
|
|
## Documentation deliverables
|
|
|
|
- Inline API/export documentation for rig and collision policies
|
|
- Camera module spec with inputs/outputs, data-flow, state and sequence diagrams
|
|
- Updated input/movement consumer diagrams/source maps and module registry
|
|
|
|
## Simplicity and naming
|
|
|
|
- Important names: `ThirdPersonCameraRig`, `CameraCollisionPolicy`,
|
|
`NoCameraCollisionPolicy`
|
|
- Simplest approach: one Node3D rig on existing CameraPivot and one explicit identity policy
|
|
- Rejected complexity: generic camera framework, spring arm migration and hidden physics raycast
|
|
- Unavoidable complexity: rig mutates Camera3D/character Node transforms on main thread
|
|
- Measured optimization evidence: not applicable
|
|
|
|
## Status
|
|
|
|
- State: active
|
|
- Done: claim and isolated worktree from updated master
|
|
- Next: implement rig/policy, migrate scenes/player, test and document
|
|
- Blocked by:
|
|
|