-
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
Changed default pointer extent to make mouse pointer behavior more intuitive #10075
Conversation
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
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. @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 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. |
There was a problem hiding this 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.
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](https://user-images.githubusercontent.com/39840334/125538840-e165e4bb-5b45-4ea0-9f13-30196dd6eaee.gif)
New (There are still some distances where the alignment isn't quite right when sliding):
![MouseNew](https://user-images.githubusercontent.com/39840334/125538833-be9df2d0-e3cf-4f92-947d-da81435746bb.gif)
Changes