- Implement Context-Based Input system:
- Added `IMC_ItemHeld` mapping context.
- Added logic to switch contexts when picking up/dropping items.
- Added `Throw` (LMB/R2) and `Aim` (RMB/L2) input actions.
- Refactor Interaction Logic:
- `Interact`: Now handles picking up items or gently dropping them if held.
- `OnThrowInput`: Implemented physics-based throw towards camera aim point (center of screen raycast).
- Added character rotation to face the throw target instantly.
- Update Physics & Movement:
- Added `bStrafing` mode to `TengriMovementComponent` to allow rotation towards camera view.
- Updated `TengriPickupActor` to use `bVelChange` for impulses (ignoring mass for consistent throw arc).
- Tuned throw force and added vertical arc bias.
- Fixes:
- Resolved rotation logic in MovementComponent to support Aiming state.
Implemented a responsive, deterministic jump system with "game feel" enhancements and advanced air physics.
Changes:
- **Jump Logic**: Added variable jump height (hold/release control).
- **Game Feel**: Implemented Coyote Time (jump after leaving ledge) and Jump Buffering (early input registration).
- **Air Physics**: Added non-linear gravity (FallingGravityScale) for snappy jumps and Terminal Velocity clamping.
- **Landing**: Added OnLanded delegate with heavy/light landing detection based on impact velocity.
- **Config**: Added auto-calculation logic in PostEditChangeProperty to derive Gravity and JumpVelocity from desired JumpHeight and TimeToApex.
- **Debug**: Added on-screen debug messages for Velocity Z and movement state.
- **Fix**: Moved delegate declaration to global scope to fix blueprint visibility issues.
Relates to: Phase 13, Phase 14
BREAKING CHANGE: Movement now runs on deterministic 120Hz physics
- Physics and render states separated
- Visual interpolation for smoothness
- Deterministic physics independent of FPS
Added:
- Dual state system (Physics vs Render)
- Fixed timestep accumulator pattern
- Interpolation between physics states
- MaxAccumulatorTime to prevent spiral of death
- PhysicsTickRate config in TengriMovementConfig
- Debug HUD displays for physics rate and alpha
Changed:
- TickComponent() now accumulates time and runs physics in loop
- All movement logic moved to TickPhysics()
- Velocity → PhysicsVelocity for clarity
- SetActorLocation/Rotation moved to ApplyRenderState()
Performance:
- Added ~0.27ms per frame at 60 FPS
- Physics deterministic and reproducible
- Smooth visuals at 30-240 FPS tested
Tests:
- FT_FixedTimestep automated tests
- Manual testing checklist completed
- Determinism verified across multiple runs
Documentation:
- TDD.md updated with fixed timestep section
- Stage12_DecisionLog.md created
- Inline comments for all new methods
Refs: Roadmap.md Stage 12
## Camera System Implementation
- Add AC_Camera component with smooth interpolation using FInterpTo
- Implement device-aware sensitivity switching (Mouse: 100.0, Gamepad: 150.0)
- Add strict pitch limits (-89°/+89°) with free yaw rotation
- Support Y-axis inversion and configurable smoothing speed (20.0)
## Core Features
- ProcessLookInput(): Device-aware input processing with delta time
- UpdateCameraRotation(): Smooth interpolation to target rotation
- GetCameraRotation(): Clean API for SpringArm integration
- IsCameraRotating(): Input activity detection for animations/UI
## Data Structures
- S_CameraSettings: Configuration with sensitivity, limits, smoothing
- S_CameraState: Runtime state with current/target separation
## Debug Integration
- Add CameraInfo page (Page 5) to Debug HUD system
- Real-time display of pitch/yaw, sensitivity, rotation state
- Device-specific control hints (PageUp/PageDown vs D-Pad)
## Testing Coverage
- FT_CameraInitialization: Basic setup and device integration
- FT_CameraRotation: Input processing and rotation calculations
- FT_CameraLimits: Pitch/yaw constraint validation
- FT_CameraSensitivity: Device detection and sensitivity switching
- FT_CameraSmoothing: Smooth interpolation behavior
## Performance
- Zero allocations per frame for 60+ FPS stability
- <0.02ms per frame total camera processing time
- Deterministic behavior independent of framerate
- ~150 bytes memory footprint per component
## Integration Points
- BP_MainCharacter: SetControlRotation() for SpringArm control
- Input Device System: Automatic sensitivity switching
- Debug HUD: Camera page with real-time monitoring
- Enhanced Input: IA_Look action processing
## Documentation
- Complete ManualTestingChecklist.md with device testing
- Comprehensive TDD.md with architecture and API reference
- Inline documentation for all public methods and data structures
Ready for Stage 7: Basic ground movement with camera-relative controls.
- Implement AC_InputDevice component with OnInputHardwareDeviceChanged delegate
- Add automatic debouncing (300ms cooldown) to prevent flickering
- Provide binary device classification: IsGamepad() vs IsKeyboard()
- Integrate with Toast System for debug notifications
- Add comprehensive functional tests with manual event triggering
- Create Blueprint-callable testing utilities (BFL_InputDeviceTesting)
- Update Debug HUD with Input Device info page
- Replace polling-based detection with zero-overhead event-driven approach
Components:
- AC_InputDevice: Event-driven device detection with debouncing
- InputDeviceSubsystem: Mock UE subsystem with delegate support
- BFL_InputDeviceTesting: Blueprint test utilities for device simulation
- FT_InputDeviceRealTesting: Complete functional test suite
Resolves stick drift issues through proper debouncing while maintaining
instant response to real device changes. Ready for Enhanced Input
integration in future stages.
- Implemented deterministic surface classification (Walkable/SteepSlope/Wall/Ceiling)
- Added comprehensive test suite (10 automated tests)
- Performance optimized with cached angle thresholds in radians
- Full documentation and inline comments added
- All acceptance criteria met