-
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
[MRTK3] Added an option to use scalar distance instead of final displacement for bounds control toggle #11264
[MRTK3] Added an option to use scalar distance instead of final displacement for bounds control toggle #11264
Conversation
…for bounds control toggle
@microsoft-github-policy-service agree |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@akash14darshan, sorry for such a delayed review here. This idea looks great! I think we'd like to change it slightly so that this is the default behavior (as well as updating the distance check to only run until the movement threshold is reached, since at that point there's no way to reverse). Do you mind if I push some commits to your branch? I'm also happy to make suggestions and let you run with it though! |
@keveleigh that's a good optimization and I totally agree with you. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Until the threshold has been passed at least once
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Hey @akash14darshan, please take a look at the current state of this PR and make sure I haven't broken your original fix! I added some play mode tests to try to catch it, so it should be all good, but just want to make sure! |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
…acement for bounds control toggle (microsoft#11264) * Added an option to use scalar distance instead of final displacement for bounds control toggle * Fixed some typos in comments * Update bool to false on host deselection * Make per-frame distance checking for the threshold the default Until the threshold has been passed at least once * Update RuntimeTestUtilities.cs * Add tests * Update BoundsControlTests.cs Co-authored-by: RogPodge <39840334+RogPodge@users.noreply.github.com> Co-authored-by: Kurtis <kurtie@microsoft.com>
Overview
The toggling of bounds control is done when an asset is clicked but not moved.
The way we determine Clicked vs Moved is by using the asset's displacement. The initial position and final position.
Here is a video which demonstrates a case where the asset is moved significantly, yet determine the asset was clicked because we look only at the initial and final position, which are really close (lower than the drag threshold in this case)
overview.mp4
Changes
result.mp4
PS: Do let me know if I need to change wordings/fieldname/comments anywhere since English is not my native language.