Fixes for left-handed use (logitech)#776
Draft
andybak wants to merge 2 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to improve Logitech MX Ink stylus behavior for left-handed use by adjusting how the stylus’ active hand is detected, how controller roles are swapped, and how stylus input is routed in UnityXR.
Changes:
- Update MX Ink hand assignment detection and add logic to swap Brush/Wand roles when the stylus and wand would otherwise be assigned to the same hand.
- Change controller visibility behavior when the stylus is active/inactive.
- Adjust UnityXR stylus-activity detection used to map trigger/grip/button inputs to stylus inputs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| Assets/ThirdParty/Logitech/Scripts/VrStylusHandler.cs | Adds handedness tracking + controller-swap logic and changes how controller models are shown/hidden when the stylus is present. |
| Assets/Scripts/Input/UnityXRControllerInfo.cs | Changes stylus-activity gating used to decide when to read stylus tip/cluster inputs instead of controller inputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| private float _hapticClickAmplitude = 0.9f; | ||
| private float _hapticClickMinThreshold = 0.2f; | ||
|
|
||
| private OVRPlugin.Hand prevHandSetting = OVRPlugin.Hand.None; |
|
|
||
| // Select the right/left hand stylus pose to be used | ||
| string MX_Ink_Pose = _stylus.isOnRightHand ? MX_Ink_Pose_Right : MX_Ink_Pose_Left; | ||
| // Not sure why but this works whether stylusIsAssignedRight or stylusIsAssignedLeft |
Comment on lines
+128
to
+129
| InputManager.Brush.ShowController(false); | ||
| InputManager.Wand.ShowController(true); |
Comment on lines
134
to
137
| private bool IsStylusActive() | ||
| { | ||
| return stylusState.isActive && isBrush; | ||
| return stylusState.isActive; | ||
| } |
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.
No description provided.