UnityRenderStreaming icon indicating copy to clipboard operation
UnityRenderStreaming copied to clipboard

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

Open joingen opened this issue 1 year ago • 1 comments

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 avatar Oct 11 '24 09:10 joingen

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.

GISnick avatar Dec 26 '24 17:12 GISnick