Motion Sensor / Gyro Aiming support#644
Open
AL2009man wants to merge 25 commits intofgsfdsfgs:portfrom
Open
Conversation
This adds Gyro Aiming support for compatible controllers such as PlayStation and Nintendo Switch controllers! Gyro Aiming is enabled by default for Crosshair/Aiming only. Gyro-specific features will include the following: * Gyro Sensitivity sliders for both Camera and Crosshair (up to 30x) * Gyro Speed X/Y scale are based on Natural Sensitivity Scale / Real World Sensitivity * 1.00 is equivalent to 1:1 Controller Movement, 2.50-onwards will multiply. **This only applies to [Gyro Speed X/Y]** * Gyro Orientation (Yaw, Roll, Local Space, Player Space, World Space) * Gyro Calibration (Gyro Calibration UI, Auto-Calibration modes, or on-the-fly Calibration) * Gyro Activation Modifier (Always On, Toggle, Hold) * X/Y Output Mixer, Smoothing, Tightening, Deadzone and Invert Y/X. * Reset Camera / Crosshair action (also works on regular joystick and keyboard/mouse inputs!)
will be migrating to a separate PR instead.
…rfect_dark into PerfectGyroDarkZero
Temporarily reverts back to previous commit and redid organization, this should address a bug where Gyro Autocalibration stopped working after first calibration Additionally: the Gyro Processing order has been changed, it should improve overall responsiveness.
…ck/Select Button improved Gyro Deltarate, now uses game engine's internal deltatime rate instead. Also changed Gyro Calibration (Manual) binding to BACK/SELECT Button as the new default. DualShock 4 users should be able to simply calibrate the gyro on the fly without the need to rebind.
SDL_WINDOWEVENT ain't suppose to be here yet.
Upgraded the Noise Threshold of Motion Sensor, will now be based upon SDL TestController's Gyro/Accel Noise threshold system. However: this requires updating and cleaning up Gyro AutoCalibration system inorder to better support the new threshold
Moderate weak the confidence and stillness level during Gyro Autocalibration across Always and Stationary Mode. Always mode should be balanced in terms of confidence level.
…ce reset on Menu Diag while using Menu-only Gyro AutoCalib Gyro Autocalibration's save offset wasn't saving properly while switching modes, but it should now functions as intended. also: while `GYRO_AUTOCALIBRATION_MENU_ONLY` / `1` is set: the entire autocalibration process will now reset everytime MenuDataisdialogopen
Stationary/Menu calibration should now consistenly be timer-based, while Always mode leverage GamepadMotionHelper's confidence system better.
Author
|
after a series of hardships, despite issues): I can confidently say that this PR is 99% complete! the reason why you see a couple of more commits is due to getting Gyro Autocalibration to work properly, it took a while to get there (due to lack of a proper debug log, but recently got the message notes working properly inorder to debug and fix), but it's pretty much lock-in. (edit: well, as long as I don't stop any more bugs) All that's left is the maintainer to review and push it. all future Gyro-related changes will have to be reside in a separate PR |
…ontroller still GamepadMoitonHelper's Confidence system has been added to Stationary system again, but this time: applies to menu-based gyro autocalibration, this should prevent accidental bad calibrations.
…own instead of 10s Gyro Autocalibration's timer function for "While In Menu" should now behave properly.
to prevent anymore merge conflict, the placement order for Crosshair Swivel fix has been corrected...i hope?
to reduce bloat, and make it easier to manage: Crosshair/Camera Recenter action has been migrated to fgsfdsfgs#682
ff8338a to
9c62596
Compare
after debating, I decided to combine Gyro Speed X and Y (including Gyro Crosshair) into one single "Gyro Speed". As the general sensitivity operates more like Natural Sensitivity Scale for "Gyro Speed", it now has a "x" symbol to better indicate it's "multiplier" nature of it. Those whose coming to Steam Input's Gyro Settings or Fortnite (but they use the "1:1" setup) will be far more familiar with that setup. and don't worry: `pd.ini`'s `GyroSpeed` and `GyroAimSpeed` will prioritize based on the higher value as a result: "Gyro X/Y Output Mixer" slider placement has been moved to below Gyro Crosshair Speed slider, as that becomes your main way to reduce the Horizontal and Vertical Sensitivity slider. For those who prefer individual X and Y Camera sliders: just enable "Gyro Advanced Settings", but it will disable X/Y Output Mixer.
Reworked Natural Sensitivity Scale to use camera angles directly
will be a bit closer to SDL TestController's setup
fa06b9b to
3dd5d21
Compare
fixed a bug when using Gyro Input when Mouse Aim Lock is enabled, the crosshair still moves at the same time. Additionally: the gyro clamp was removed and move the gyro's framerate scale over to `input.c` to better match `allowmlook` 's setup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
One year ago, I made a request on adding Gyro Aiming support (#418), one year later: I decided to attempt to add gyro aiming support myself, with assistances.
Thus: this adds Gyro Aiming support for compatible controllers such as PlayStation and Nintendo Switch controllers! Gyro Aiming is enabled by default for Crosshair/Aiming only. Portions of this feature is powered by GamepadMotionHelper (but a fork of a fork to allow easier C compatibility layer) to handle Gyro Calibration and Gyro Space orientation (Player Space and World Space)
this new addition will add various gyro-related features that is known to be featured in some commercially released games. while not everything is feature, the necessities are in:
This PR also includes some quality-of-life changes on the Inputs side that includes: