Hello everyone,
I’m trying to make a summary of the situation (updated to 4.16) of mouse problems when playing a project packed for HTML (I’m testing on Firefox 53.0.3 64 bit)
How I’ve set up the test project:
- Create an FPS project for mobile
- Create a widget, create a button inside of the widget with an “on clicked” event (I connected a print string “FIRE!!” to test the working button)
- Then in the level blueprint I’ve set as in the image below!
Then I start to list all the cases:
Example1
In project setting → Input I leave all untouched
I pack for html and try on browser
Result: I see the touch interface, I can click 1000 times the mouse won’t lock to the screen, so I have a bad navigability since the mouse pointer from the browser is interfering with the game’s mouse coordinates, so my turn/lookup angles are limited, BUT when I press “P” the button is clickable and working
Example2
In project setting → Input I un-tick “use mouse for touch”
(I un-ticked even the “always show touch interface” and cleared the default touch interface to get rid of the mobile interface but that’s not the problem, I checked with a test that this problem is brought by “use mouse for touch” option)
I pack for html and try on browser
Result: I don’t have the mobile interface, when I click in the viewport my mouse is caught and locked by the browser, so it disappears, my navigation is perfect, but when I press “P” the mouse is not coming back and the button is unreachable and I cannot make it work
Example3
In project setting → Input I un-tick “use mouse for touch” and “capture mouse on launch”, set to not capture and do not lock
I pack for html and try on browser
Result: it happens the same as in example 2, so I don’t have the mobile interface, when I click in the viewport my mouse is caught and locked by the browser, so it disappears, my navigation is perfect, but when I press “P” the mouse is not coming back and the button is unreachable and I cannot make it work
Example4 and 5
In project setting → Input I un-tick “use mouse for touch” and “capture mouse on launch”, set to not capture and do not lock
Tn the level blueprint I’ve changed “Set Input Mode Game Only” with “Set Input Game and UI” (choosing to not lock and not hide cursor on capture)
I pack for html and try on browser
Result: my mouse is visible and isn’t caught by the browser when I click on viewport, now to look around I have to click and drag with the mouse (it works correctly), I don’t have the mobile interface, when I press “P” my mouse is still visible and the button is reachable and it work; BUT if in level blueprint I tick “hide cursor during capture”: when the game start on browser the mouse is still visible, if I try to click and drag to look around the character go really crazy as if the turn/lookup rate is way higher (and during the drag the mouse doesn’t hide)
Example6
This case is more difficult to make it standard, since I noticed in one of my projects and I usually work with sublevels: to put it simple I start in the permanent level blueprint with a “set input mode UI only” and only after clicking on a widget button (basically my main menu) I actually load my sublevels and pass to “set input mode game only”; so when I test in browser at the beginning I can click 100 times in viewport and the browser doesn’t caught my mouse, BUT as soon as I go on and enter in the actual game my mouse is caught by browser and I restart to have all the previous issues (from examples 1 to 5)