It looks like what I'm currently doing, I just surrounded each of the rotation with a test to make it move only when the mouse event is different than 0 to not interfere with the gamepad controls.
var mouse_sensitivity: float = 0.005 func _input(event: InputEvent) -> void: if event is InputEventMouseMotion: if event.screen_relative.x < 0.0 or event.screen_relative.x > 0.0: global_rotation.y -= event.screen_relative.x * mouse_sensitivity if event.screen_relative.y < 0.0 or event.screen_relative.y > 0.0: camera_root.rotation.x -= event.screen_relative.y * mouse_sensitivity
But maybe I should better use the rotate method instead of setting the rotation property manually.
There is a note about this in the Godot documentation regarding the Mouse and input coordinates I follow. But it seems even though the mouse is in capture mode, it still goes out of the window when playing in HTML. Maybe is there something to set in the Web export too.
Thanks for the input! (Input, haha)