Much better state machine, crouch ceiling detection and GamePad support

This commit is contained in:
2023-12-19 18:34:49 -08:00
parent 241a48e642
commit 26f7e773e2
3 changed files with 122 additions and 65 deletions

View File

@ -59,11 +59,12 @@ MarginContainer/constants/margin_left = 10
MarginContainer/constants/margin_right = 10
MarginContainer/constants/margin_top = 10
[node name="Character" type="CharacterBody3D" node_paths=PackedStringArray("HEAD", "CAMERA", "CAMERA_ANIMATION")]
[node name="Character" type="CharacterBody3D" node_paths=PackedStringArray("HEAD", "CAMERA", "CAMERA_ANIMATION", "COLLISION_MESH")]
script = ExtResource("1_0t4e8")
HEAD = NodePath("Head")
CAMERA = NodePath("Head/Camera")
CAMERA_ANIMATION = NodePath("Head/camera_animation")
COLLISION_MESH = NodePath("Collision")
CROUCH = "crouch"
SPRINT = "sprint"
@ -117,4 +118,8 @@ layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="UserInterface/DebugPanel/MarginContainer"]
layout_mode = 2
[node name="CrouchCeilingDetection" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
target_position = Vector3(0, 1, 0)
[editable path="UserInterface/Reticle_1"]