[gd_scene load_steps=10 format=3 uid="uid://clhy3kiceqf2o"]

[ext_resource type="Script" uid="uid://day6rhxicaxqf" path="res://src/gameplay/characters/player/player_character.gd" id="1_hqu6r"]
[ext_resource type="Script" uid="uid://dsjlv8midt2g2" path="res://src/gameplay/characters/character_movement.gd" id="2_1ixuj"]
[ext_resource type="Script" uid="uid://2y3gnaqtrfnx" path="res://src/gameplay/characters/player/head.gd" id="2_fjt7c"]
[ext_resource type="Script" uid="uid://44s0v8mukxk4" path="res://src/core/camera/shaking_camera.gd" id="4_ci1ud"]
[ext_resource type="Script" uid="uid://nuwb55sbveaf" path="res://src/gameplay/characters/common/footstep_component.gd" id="4_vq0uu"]

[sub_resource type="Resource" id="Resource_vq0uu"]
script = ExtResource("2_1ixuj")
jump_height = 0.25
max_turning_speed = 70.0
peak_gravity_multiplier = 0.3
metadata/_custom_type_script = "uid://dsjlv8midt2g2"

[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_bdj5f"]
margin = 0.01
radius = 0.46
height = 1.8

[sub_resource type="CylinderShape3D" id="CylinderShape3D_bdj5f"]
margin = 0.01
height = 1.8
radius = 0.46

[sub_resource type="CylinderShape3D" id="CylinderShape3D_ntkcp"]
height = 1.59
radius = 0.45

[node name="PlayerCharacter" type="StairsCharacter3D"]
collider = NodePath("CylinderCollider")
step_height_up = 0.7
step_height_down = 0.7
collision_layer = 2
script = ExtResource("1_hqu6r")
standup_speed_affection = 0.15
standup_speed_affection_speed_multiplier = 0.5
movement = SubResource("Resource_vq0uu")
metadata/_custom_type_script = "uid://day6rhxicaxqf"

[node name="CapsuleCollider" type="CollisionShape3D" parent="."]
process_mode = 4
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0)
visible = false
shape = SubResource("CapsuleShape3D_bdj5f")
disabled = true

[node name="CylinderCollider" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0)
shape = SubResource("CylinderShape3D_bdj5f")

[node name="Head" type="Node3D" parent="." node_paths=PackedStringArray("camera", "headbob_character", "headbob_target", "step_smoothing_target")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0)
script = ExtResource("2_fjt7c")
camera = NodePath("Headbobbing/StairStepping/ShakingCamera")
headbob_range = 0.05
headbob_frequency = 2.0
headbob_character = NodePath("..")
headbob_target = NodePath("Headbobbing")
step_smoothing_target = NodePath("Headbobbing/StairStepping")

[node name="Headbobbing" type="Node3D" parent="Head"]

[node name="StairStepping" type="Node3D" parent="Head/Headbobbing"]

[node name="ShakingCamera" type="Camera3D" parent="Head/Headbobbing/StairStepping"]
current = true
fov = 85.0
script = ExtResource("4_ci1ud")
metadata/_custom_type_script = "uid://44s0v8mukxk4"

[node name="StandupChecker" type="Area3D" parent="."]
input_ray_pickable = false

[node name="CollisionShape3D" type="CollisionShape3D" parent="StandupChecker"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.99, 0)
shape = SubResource("CylinderShape3D_ntkcp")

[node name="FootstepComponent" type="Node" parent="."]
script = ExtResource("4_vq0uu")
