ai实现基础通话功能

This commit is contained in:
2026-09-13 02:09:22 +08:00
parent d48c4f06b7
commit 1bd54e425e
7 changed files with 156 additions and 39 deletions
+12 -6
View File
@@ -28,6 +28,12 @@ func _ready() -> void:
_pitch = _spring_arm.rotation.x if _spring_arm else 0.0
_apply_axis_lock()
_apply_perspective()
# 进入直接切换第一人称
is_first_person = not is_first_person
_apply_perspective()
perspective_changed.emit(is_first_person)
get_viewport().set_input_as_handled()
func _process(_delta: float) -> void:
@@ -45,12 +51,12 @@ func _unhandled_input(event: InputEvent) -> void:
if current_scene.is_camera_input_blocked():
return
if event.is_action_pressed("toggle_camera"):
is_first_person = not is_first_person
_apply_perspective()
perspective_changed.emit(is_first_person)
get_viewport().set_input_as_handled()
return
#if event.is_action_pressed("toggle_camera"):
#is_first_person = not is_first_person
#_apply_perspective()
#perspective_changed.emit(is_first_person)
#get_viewport().set_input_as_handled()
#return
if not (event is InputEventMouseMotion):
return