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

[BUG]: When the mouse wheel function is used on the web side, the mouse position changes #1008

Open
joingen opened this issue Oct 11, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@joingen
Copy link

joingen commented Oct 11, 2024

Package version

3.1.0-exp.8

Environment

* OS:Windows11
* Unity version:Unity 2021.3.11f
* Graphics API:DirectX11
* Browser:Edge

Steps To Reproduce

Turn on cloud rendering and set a UI that displays the mouse position. Lift the mouse in the Web segment [to prevent mouse movement] Moving the middle button of the mouse will find that the mouse position is shifted

Current Behavior

No response

Expected Behavior

No response

Anything else?

No response

@joingen joingen added the bug Something isn't working label Oct 11, 2024
@GISnick
Copy link

GISnick commented Dec 26, 2024

This is a fairly important bug that has been around a while.

I am noticing it seems to only flip the Y in the browser. and that flipped value will remain until the mouse is moved again.

example:

  void Update()
    {
        if (Mouse.current != null)
        {
            print(Mouse.current.position.ReadValue().y);
        }
    }

bottom of screen = 0
top of screen = screen height.

use scroll wheel without moving mouse

(flipped y values)
bottom of screen = screen height.
top of screen = 0

  • move mouse again...mouse goes back to normal values.
  • X always stays correct

I wrote a method to track and flip the Y when its "dirty" from the scroll wheel and not yet moved. but if you move the mouse and scroll at the same time quickly it still gets wacky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants