ai实现基础通话功能
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user