修改为长按拖拽

This commit is contained in:
2026-10-09 15:14:23 +08:00
parent 66d87d48d6
commit 3920b88041
4 changed files with 34 additions and 13 deletions
+3
View File
@@ -53,6 +53,9 @@ func _unhandled_input(event: InputEvent) -> void:
elif event is InputEventMouseButton and event.pressed \
and Input.mouse_mode != Input.MOUSE_MODE_CAPTURED:
set_mouse_captured(true)
# 吃掉这一下点击:它的意义只是「把鼠标锁回游戏」,
# 不该顺带触发拾取 —— 否则重新聚焦时会凭空抓起一个物体。
get_viewport().set_input_as_handled()
func set_mouse_captured(captured: bool) -> void: