Godot Version
v4.3.stable
Question
Im still new to coding, coming back after a few months since brackeys just uploaded his new 3d game video. I tried out his Proto-controller, but the mouse would not get captured. I cannot figure out why it is not working. Here is the code:
func _unhandled_input(event: InputEvent) -> void:
# Mouse capturing
if Input.is_mouse_button_pressed(1):
print("Hello, world!")
capture_mouse()
func capture_mouse():
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
mouse_captured = true
The "print(“Hello, world!)” is not being displayed in the console either, so it must be something with the if input.is_mouse_button_pressed(1):