Adding TwoAxisVector2Composite for Legacy Joysticks with Twin Dual Axes#2363
Adding TwoAxisVector2Composite for Legacy Joysticks with Twin Dual Axes#2363vulture-boy wants to merge 2 commits intoUnity-Technologies:developfrom
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr |
PR Code Suggestions ✨Explore these optional code suggestions:
🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr |
|||||||||||
Description
This adds a new TwoAxisVector2Composite class, an ImputBindingComposite that converts two Axis values into a Vector2.
Some old Joystick devices don't support Vector2 output for a second Stick but do provide two Axis values representing it, so this class was made for such purposes. I am currently using it to support a PS2 controller hooked up to a third party PS2-to-PC adapter found at a thrift store; I imagine adding this class would contribute to improving developer accessibility associated with income brackets and help solve headaches sooner regarding broader controller compatibility with Unity products.
Testing status & QA
This has been tested in my unity project. It's based off the documented (and presumably tested) CustomComposite script here , with the only major change being the removal of the
[InitializeOnLoad]attribute to match the pattern of other built-in composites already in this repository. I have not tested it as part of this base repository but based on comparable Composite scripts it seems unlikely to cause problems.Overall Product Risks
Very low risk; this feature doesn't affect other aspects of the software dramatically and has very barebones functionality. It is an added utility that may require documentation updating however.
Comments to reviewers
N/A
Checklist
Before review:
Changed,Fixed,Addedsections.Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.