🛠️ Fixer: Correct FFB Coordinate System Alignment#115
🛠️ Fixer: Correct FFB Coordinate System Alignment#115google-labs-jules[bot] wants to merge 1 commit intomainfrom
Conversation
Corrected the direction of lateral G-forces (SoP) and scrub drag forces in `FFBEngine.h` to ensure they align with the physical coordinate system expected by DirectInput (Positive = Right, Negative = Left). - Inverted `lat_g` in `calculate_sop_lateral` and `calculate_grip` to produce Positive internal values for Right turns (-X), ensuring a correct Negative/Left pull when "Invert FFB" is enabled (standard for LMU). - Fixed `drag_dir` in `calculate_road_texture` to match the sign of lateral velocity, ensuring friction correctly opposes sliding motion. - Updated comprehensive unit test suites across `test_ffb_coordinates.cpp`, `test_ffb_slope_detection.cpp`, `test_ffb_core_physics.cpp`, and `test_ffb_internal.cpp` to reflect physically correct signs and fixed misleading comments. These changes resolve documented "Reverse FFB" sensations and "Dullness" issues caused by competing forces in the previous coordinate implementation.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR addresses a critical alignment issue in the Force Feedback (FFB) coordinate system. It ensures that lateral G-forces (Seat of Pants) and tire scrubbing forces (Scrub Drag) pull the wheel in the physically correct direction, especially when considering the mandatory "Invert FFB" setting used by most LMU players.
Key Changes:
Verification:
PR created automatically by Jules for task 14216363459105556160 started by @coasting-nc