-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch hands in SolverHandler when interactor is not actively hovering #11441
Merged
srinjoym
merged 5 commits into
microsoft:mrtk3
from
srinjoym:user/srmajumd/rayHandednessFix
Mar 31, 2023
Merged
Switch hands in SolverHandler when interactor is not actively hovering #11441
srinjoym
merged 5 commits into
microsoft:mrtk3
from
srinjoym:user/srmajumd/rayHandednessFix
Mar 31, 2023
Conversation
This file contains 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
srinjoym
changed the title
Switch hands in SolverHandler when ray interactor is inactive
Switch hands in SolverHandler when interactor is not actively hovering
Mar 29, 2023
srinjoym
requested review from
marlenaklein-msft,
AMollis and
shaynie
as code owners
March 29, 2023 21:02
shaynie
previously approved these changes
Mar 29, 2023
marlenaklein-msft
previously approved these changes
Mar 29, 2023
AMollis
previously approved these changes
Mar 29, 2023
A unit test would be nice :) |
…rinjoym/MixedRealityToolkit-Unity into user/srmajumd/rayHandednessFix
srinjoym
dismissed stale reviews from AMollis, marlenaklein-msft, and shaynie
via
March 30, 2023 19:14
aa2290a
AMollis
previously approved these changes
Mar 30, 2023
shaynie
previously approved these changes
Mar 30, 2023
shaynie
approved these changes
Mar 31, 2023
drusk-unity
pushed a commit
to drusk-unity/MixedRealityToolkit-Unity
that referenced
this pull request
Jun 26, 2023
microsoft#11441) * check if controller hover is active in solver handler * add tests for solver handler :)
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.
Overview
The
SolverHandler
script is responsible for tracking a target and sending a goal position to any solvers. TheSolverHandler
can track the user's head, hand joints or interactors. It can also track just one hand, or both hands. This PR fixes a bug that occurs when using theSolverHandler
script to tracking both left and right interactors. If the user's original hand goes out of view, theSolverHandler
does not automatically switch to tracking the other hand (even if it's in view).This behavior was implemented correctly in MRTK 2 (code). However, in MRTK 3 the check for if the controller is active was removed.
This PR updates the
SolverHandler
to check if the current interactor is actively hovering. If it's not active hovering, the script switches to the other interactor. Here's a video of the new behavior:https://user-images.githubusercontent.com/7866060/228664304-527e5b5c-6515-4bb1-89c2-34893640ca2a.mp4
Note: This does not solve a related issue with
SolverHandler
where it does not switch hands when tracking hand joints. This fix only applies to interactors.Changes
Verification
Not sure if there's any unintended changes to the behavior here. The interactor will not be actively hovering if the target does not have an
Interactable
script on it.Also looking into adding tests to validate this behavior.