Hello, mouse input in HTML5/web exports produces large random jumps (both relative and screen_relative), both at the moment mouse capture mode is enabled, and randomly while it’s already active. This happens consistently and essentially makes it impossible to build 3D first or third person games. I’ve searched extensively online and understand that it’s harder to handle on web due to the underlying browser APIs being different. However, this issue has somehow been solved in other engines.
If anyone has knowledge on this subject or has already encountered this problem, I’d love to know what you did to work around it. Thank you.
func _unhandled_input(event):
if event is InputEventMouseMotion and d.device == "Computer":
if Input.is_mouse_button_pressed(MOUSE_BUTTON_RIGHT) or d.shiftLock:
d.camX = clamp(d.camX - event.screen_relative.y * defaultSensivity * 1.15, -1.2, 0.85)
d.camY -= event.screen_relative.x * defaultSensivity * 1.15