Skip to content
Dimitar Dimitrov edited this page Aug 13, 2021 · 4 revisions

Here are some Frequently Asked Questions!

Q: Why my mouse doesn't get captured on Web/HTML5?

A: The Web/HTML5 requires the mouse to be captured via mouse click function.
The easiest way to it is in the func _input(event: InputEvent) inside Player.gd add

if event is InputEventMouseButton:
		if event.button_index == BUTTON_LEFT && event.pressed:
			Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
Clone this wiki locally