修改为长按拖拽
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user