Skip to content
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

Changed default pointer extent to make mouse pointer behavior more intuitive #10075

Merged
merged 1 commit into from
Aug 3, 2021

Conversation

RogPodge
Copy link
Contributor

Overview

Changes the default pointing extent for the screen space mouse pointer to be much smaller, thus making the mouse pointer interactions with the sliders much more natural and intuitive.

The reason for this change is because a mouse pointer's "position" is determined by the following

Camera Position + mouse pointer forward transform * DefaultPointerExtent.

This means that the mouse pointer's position is always DefaultPointerExtent units away from the camera, which makes the mosue pointer's position in world space change pretty drastically. In the current architecture, it's quite a bit more work to make the mouse pointer's position coincide with the position of it's raycast hit target, so this PR alleviates the high variance issue by decreasing DefaultPointerExtent to a more reasonable value of 1.

Old:
Mouseold

New (There are still some distances where the alignment isn't quite right when sliding):
MouseNew

Changes

@RogPodge
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@RogPodge RogPodge requested review from Zee2 and keveleigh July 14, 2021 17:29
@Zee2
Copy link
Contributor

Zee2 commented Jul 19, 2021

I've tried to verify this, but I'm seeing quite a strange behavior with the screen space mouse pointer. When interacting with the slider, the slider moves in the proper way, but the mouse cursor itself stays frozen until the slider is released.
slidercursor

@RogPodge is this some problem with how I've set up the mouse pointer? I followed the repro instructions as closely as I could in the original issue (#10071 )

@RogPodge
Copy link
Contributor Author

I've tried to verify this, but I'm seeing quite a strange behavior with the screen space mouse pointer. When interacting with the slider, the slider moves in the proper way, but the mouse cursor itself stays frozen until the slider is released.
slidercursor

@RogPodge is this some problem with how I've set up the mouse pointer? I followed the repro instructions as closely as I could in the original issue (#10071 )

The behavior of having 2 mouse cursors occurs when you use the MousePointer prefab in the input profile rather than the ScreenSpaceMousePointer

image

As for why that happens, I think it's because that pointer's cursor behavior is similar to our gaze cursor and far pointer's behavior with the sliders. Once the pointer is "focus locked" with the slider, the cursor becomes rooted in place.

@RogPodge RogPodge added this to In progress in [Retired] MRTK Backlog via automation Jul 20, 2021
@RogPodge RogPodge moved this from In progress to Needs Code Review in [Retired] MRTK Backlog Jul 20, 2021
@RogPodge RogPodge added this to the MRTK 2.8.0 milestone Jul 22, 2021
Copy link
Contributor

@MaxWang-MS MaxWang-MS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure to mention the change in release notes.

@RogPodge RogPodge merged commit 7c5b0ca into microsoft:main Aug 3, 2021
[Retired] MRTK Backlog automation moved this from Needs Code Review to Fixed - Needs Release Notes Aug 3, 2021
@RogPodge RogPodge moved this from Fixed - Needs Release Notes to Done - July 2021 in [Retired] MRTK Backlog Aug 9, 2021
keveleigh pushed a commit to keveleigh/HoloToolkit-Unity that referenced this pull request Dec 7, 2021
keveleigh pushed a commit to keveleigh/HoloToolkit-Unity that referenced this pull request Dec 7, 2021
keveleigh pushed a commit to keveleigh/HoloToolkit-Unity that referenced this pull request Dec 7, 2021
keveleigh pushed a commit to keveleigh/HoloToolkit-Unity that referenced this pull request Dec 7, 2021
keveleigh pushed a commit to keveleigh/HoloToolkit-Unity that referenced this pull request Dec 7, 2021
keveleigh pushed a commit to keveleigh/HoloToolkit-Unity that referenced this pull request Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
[Retired] MRTK Backlog
Done - July 2021
Development

Successfully merging this pull request may close these issues.

Unable to manipulate the sliders with the mouse or the touch screen
3 participants