Capture mouse and release?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By imekon

I can capture the mouse with:

Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)

Where should I put this? In _input() or _ready()?

How do I break out of the captured mouse?

:bust_in_silhouette: Reply From: imekon

Put the Input.set_mouse_mode in _ready

Use escape to get_tree().quit()