This is made in Godot. See this tutorial: https://kidscancode.org/godot_recipes/4.x/input/mouse_capture/index.html