Add a toggle button for the debug panel and clean up some comments
This commit is contained in:
@ -45,12 +45,12 @@ extends CharacterBody3D
|
|||||||
@export var RIGHT : String = "ui_right"
|
@export var RIGHT : String = "ui_right"
|
||||||
@export var FORWARD : String = "ui_up"
|
@export var FORWARD : String = "ui_up"
|
||||||
@export var BACKWARD : String = "ui_down"
|
@export var BACKWARD : String = "ui_down"
|
||||||
## By default this does not pause the game, but that can be set in _process.
|
## By default this does not pause the game, but that can be changed in _process.
|
||||||
@export var PAUSE : String = "ui_cancel"
|
@export var PAUSE : String = "ui_cancel"
|
||||||
@export var CROUCH : String = "crouch"
|
@export var CROUCH : String = "crouch"
|
||||||
@export var SPRINT : String = "sprint"
|
@export var SPRINT : String = "sprint"
|
||||||
|
|
||||||
# Uncomment if you want full controller support
|
# Uncomment if you want controller support
|
||||||
#@export var controller_sensitivity : float = 0.035
|
#@export var controller_sensitivity : float = 0.035
|
||||||
#@export var LOOK_LEFT : String = "look_left"
|
#@export var LOOK_LEFT : String = "look_left"
|
||||||
#@export var LOOK_RIGHT : String = "look_right"
|
#@export var LOOK_RIGHT : String = "look_right"
|
||||||
@ -375,7 +375,13 @@ func _process(delta):
|
|||||||
#get_tree().paused = false
|
#get_tree().paused = false
|
||||||
|
|
||||||
|
|
||||||
func _unhandled_input(event):
|
func _unhandled_input(event : InputEvent):
|
||||||
if event is InputEventMouseMotion and Input.mouse_mode == Input.MOUSE_MODE_CAPTURED:
|
if event is InputEventMouseMotion and Input.mouse_mode == Input.MOUSE_MODE_CAPTURED:
|
||||||
mouseInput.x += event.relative.x
|
mouseInput.x += event.relative.x
|
||||||
mouseInput.y += event.relative.y
|
mouseInput.y += event.relative.y
|
||||||
|
# Toggle debug menu
|
||||||
|
elif event is InputEventKey:
|
||||||
|
if event.is_released():
|
||||||
|
# Where we're going, we don't need InputMap
|
||||||
|
if event.keycode == 4194338: # F7
|
||||||
|
$UserInterface/DebugPanel.visible = !$UserInterface/DebugPanel.visible
|
||||||
|
@ -375,7 +375,7 @@ libraries = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[node name="Head" type="Node3D" parent="."]
|
[node name="Head" type="Node3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0)
|
transform = Transform3D(-0.730162, 0, -0.683274, 0, 1, 0, 0.683274, 0, -0.730162, 0, 1.5, 0)
|
||||||
|
|
||||||
[node name="Camera" type="Camera3D" parent="Head"]
|
[node name="Camera" type="Camera3D" parent="Head"]
|
||||||
|
|
||||||
@ -383,7 +383,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0)
|
|||||||
libraries = {
|
libraries = {
|
||||||
"": SubResource("AnimationLibrary_o0unb")
|
"": SubResource("AnimationLibrary_o0unb")
|
||||||
}
|
}
|
||||||
blend_times = [&"RESET", &"RESET", 0.5, &"RESET", &"walk", 0.5, &"walk", &"RESET", 0.5]
|
blend_times = [&"walk", &"RESET", 0.5, &"RESET", &"walk", 0.5, &"RESET", &"RESET", 0.5]
|
||||||
|
|
||||||
[node name="JumpAnimation" type="AnimationPlayer" parent="Head"]
|
[node name="JumpAnimation" type="AnimationPlayer" parent="Head"]
|
||||||
libraries = {
|
libraries = {
|
||||||
@ -423,3 +423,4 @@ target_position = Vector3(0, 0.5, 0)
|
|||||||
|
|
||||||
[node name="EditorModule" type="Node" parent="."]
|
[node name="EditorModule" type="Node" parent="."]
|
||||||
script = ExtResource("3_v3ckk")
|
script = ExtResource("3_v3ckk")
|
||||||
|
head_y_rotation = -136.9
|
||||||
|
Reference in New Issue
Block a user