UWP Mouse Position offset

Hi everyone,

I have been having some issues with the new input system for my UWP build. In the editor everything works fine, along with my iOS and Android builds using Touch Position in place of Mouse Position.

However, when I build to UWP, my mouse position is offset along Y, and I am required to make selections above where I need to select.

They way I use the mouse position is as follows;

this.pointerPosition = obj.ReadValue<Vector2>();
RaycastHit2D hit = Physics2D.Raycast(
MainCamera.ScreenToWorldPoint(this.pointerPosition),
Vector2.zero);

I have no processors attached to the Mouse action, and the offset occurs regardless of full screen or windowed mode.
Using Unity 2019.4.3f1 (also tested using latest 2020 build), and Input System 1.0.0

Any help would be appreciated!

Submitted bug report. Case number is 1269426

Attempted to set the action type as both Passthrough, and Value. No change.

As a test, I downloaded the Visualizer sample and built to UWP. Here is a screenshot of where the cursor is being detected as point 0,0.

Thank you for filing the ticket. Needs looking at.

1 Like

I am having the same issue

How do I fix this?

I would assume a quick solution would be to apply a Processor to the Mouse Position Action, keeping X as 1, and Y as 1.333 (or whatever the difference is to offset it to the correct position).

I have decided to wait for a bug fix, as I am unsure how this could be affected on different versions of Windows and machines. Hopefully we can get a fix soon as this is the last thing I need to do before uploading my build to the Microsoft Store :slight_smile:

Might there be an update on this issue, or a more ideal work around?