let mouse be FREEEEE

This commit is contained in:
WiseNoodle
2025-08-10 22:42:11 -04:00
parent eb783c37da
commit 69596dac01
2 changed files with 11 additions and 1 deletions

View File

@@ -51,8 +51,13 @@ func _input(event):
if Input.is_action_just_pressed("jump"):
jumping = true
if event.is_action_pressed("esc") and Input.mouse_mode == Input.MOUSE_MODE_CAPTURED:
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
elif event.is_action_pressed("esc") and not Input.mouse_mode == Input.MOUSE_MODE_CAPTURED:
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
func _physics_process(delta: float) -> void:
if is_multiplayer_authority():
velocity = walk(delta) + _gravity(delta) + _jump(delta)

View File

@@ -117,6 +117,11 @@ look_up={
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":-1.0,"script":null)
]
}
esc={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
[layer_names]