HTML5 Mouse Input ~10x higher when not locked to viewport

All the information is basically in the title.

Setup a player controller that prints the axis value of Mouse X, make sure mouse cursor doesn’t get locked and remains shown, package to HTML5 and try it in your browser.

Tested in Chrome and MS Edge.

Hey

  • Is this happening on any project or template within UE4?
  • Are you able to reproduce this on a newly created project/template?
  • Which version of the engine are you working on, please include the changelist (example: Version: 4.11.1-2934540+++UE4+Release-4.11)
  • Are you on a source or binary version of the engine?
  • Is this happening on the Windows or Mac platform as well?

Looking forward to hearing back from you, thanks!

  • If I make a new project that takes axis input from the mouse and make it not lock to the viewport then package to html5 and run it in the browser, then the issue is present. On all browsers.
  • ^
  • Don’t know where to find the changelist, it’s 4.11.1 , I can get the rest if you tell me where to find it
  • Initially I was using the binary version but much later down the road something unrelated that I wanted to try required the source, both have the issue
  • Windows, wouldn’t know about Mac

I attempted to reproduce the issue that you explained however, I was not able to get the mouse to respond the way that you had stated it to be. I went ahead and spoke with our Developer and he’s came up with an idea.

This issue is likely due to the game window sitting inside of a “margin” space.

The top (red circle) 14px spacing will always show the y-value with an extra 14 unite value. Then there is the left (green lines) which is an extra (depending on the width of your browser) and they include added values.

Here’s an additional [example][2] that you may find useful.

As you can see, you’ll never get 0x0 and if you inspect element, you’ll see that there is an 8x8 margin which causes the smallest number to be 8x8 margin.

We are going to continue to look into this, if we see something else we need to note, we’ll update accordingly.

Thank you!

Hey

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you!