Join GitHub today
Firefox: clicking (left/right) retargets camera #56
Several reports of this issue (or what I suspect to be this issue: https://www.spigotmc.org/threads/websandboxmc.232807/#post-2356412 and https://forums.glowstone.net/topic/56/websandboxmc-web-based-client-providing-an-interactive-glimpse-of-a-part-of-your-server-using-webgl-html5/4), adding to "important" milestone. I guess more people use Firefox than I suspected?
This occurs even on d21b994 Tue Apr 4, so may not be a recent bug, there since the beginning of this emscripten Craft port.
Doesn't occur when pressing Enter or Control-Enter, to simulate clicks (calls
It's almost as if clicking translates to mouse movement - the player faces downwards, and rotates about 90º on mouse down, then another 90º on release.
Adding logging on click and move:
Chrome and Safari have glfwGetInputMode() return the same value before and after the click, so the movement delta is 0:
22craft.html:1233 handle_mouse_input getCursorPos mx-px=726-726=0, my-py=838-838=0
whereas Firefox 53.0 (64-bit) calculate a positive delta:
on_mouse_button, button=1 craft.html:1233:13
It is 748 and 616 in this log, but if I shrink the window, 487, appears to be a function of the window size. If I resize the window client area to exactly 1000x100, then mx-px is 500 and my-py is 671.