godot-karrot-starter-theme/Entities/Player/Player.tscn
2024-11-14 19:25:11 +01:00

314 lines
14 KiB
Plaintext

[gd_scene load_steps=32 format=3 uid="uid://br57yle5ldjmr"]
[ext_resource type="Script" path="res://Common/CameraController/CharacterCameraController.cs" id="1_8tlkf"]
[ext_resource type="Script" path="res://Entities/Player/Player.cs" id="1_38iga"]
[ext_resource type="Script" path="res://Common/CharacterMovement/CharacterMovementController.cs" id="1_trsp8"]
[ext_resource type="Script" path="res://Common/CharacterMovement/CharacterMovementMode.cs" id="2_bpavf"]
[ext_resource type="CameraAttributesPractical" uid="uid://r5d50o2xokon" path="res://Resources/Misc/CameraAttributes.tres" id="2_cps54"]
[ext_resource type="PackedScene" uid="uid://cb7dybtexd7ct" path="res://Content/Scenes/Characters/XBot.tscn" id="2_mdp28"]
[ext_resource type="Script" path="res://Common/AnimNotifies/AnimNotify.cs" id="2_s6gd6"]
[ext_resource type="Script" path="res://Entities/Player/PlayerStateMachine.cs" id="3_qdcd8"]
[ext_resource type="Script" path="res://Entities/Player/States/IdleState.cs" id="4_0y3wl"]
[ext_resource type="Script" path="res://Entities/Player/States/WalkState.cs" id="5_l6jgd"]
[ext_resource type="Script" path="res://Entities/Player/States/RollState.cs" id="7_ye038"]
[sub_resource type="Resource" id="Resource_h2cpj"]
script = ExtResource("2_bpavf")
Name = ""
speed = 2.0
ignoreUpDirection = true
acceleration = 1.0
deceleration = 1.0
gravityScale = 1.0
rotationRate = 0.0
[sub_resource type="Resource" id="Resource_gjtqv"]
script = ExtResource("2_bpavf")
Name = ""
speed = 4.0
ignoreUpDirection = true
acceleration = 1.0
deceleration = 1.0
gravityScale = 1.0
rotationRate = 360.0
[sub_resource type="Resource" id="Resource_rjvy2"]
script = ExtResource("2_bpavf")
Name = ""
speed = 4.0
ignoreUpDirection = true
acceleration = 1.0
deceleration = 1.0
gravityScale = 1.0
rotationRate = 360.0
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_inwpe"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_dj5mk"]
animation = &"Stand To Roll"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_a85v2"]
animation = &"Idle"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_fngip"]
animation = &"Running"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_fx22w"]
animation = &"Right Strafe"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_xkc2e"]
animation = &"Left Strafe"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_74w08"]
animation = &"Running Backward"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_k2v8r"]
animation = &"Left Strafe Walk"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ngtvm"]
animation = &"Right Strafe Walk"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_gxvjv"]
animation = &"Walking"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_dktww"]
animation = &"Walking Backwards"
[sub_resource type="AnimationNodeBlendSpace2D" id="AnimationNodeBlendSpace2D_4j2fv"]
blend_point_0/node = SubResource("AnimationNodeAnimation_a85v2")
blend_point_0/pos = Vector2(0, 0)
blend_point_1/node = SubResource("AnimationNodeAnimation_fngip")
blend_point_1/pos = Vector2(0, 4)
blend_point_2/node = SubResource("AnimationNodeAnimation_fx22w")
blend_point_2/pos = Vector2(4, 0)
blend_point_3/node = SubResource("AnimationNodeAnimation_xkc2e")
blend_point_3/pos = Vector2(-4, 0)
blend_point_4/node = SubResource("AnimationNodeAnimation_74w08")
blend_point_4/pos = Vector2(0, -4)
blend_point_5/node = SubResource("AnimationNodeAnimation_k2v8r")
blend_point_5/pos = Vector2(-2, 0)
blend_point_6/node = SubResource("AnimationNodeAnimation_ngtvm")
blend_point_6/pos = Vector2(2, 0)
blend_point_7/node = SubResource("AnimationNodeAnimation_gxvjv")
blend_point_7/pos = Vector2(0, 2)
blend_point_8/node = SubResource("AnimationNodeAnimation_dktww")
blend_point_8/pos = Vector2(0, -2)
min_space = Vector2(-4, -4)
max_space = Vector2(4, 4)
snap = Vector2(1, 1)
sync = true
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_er75r"]
animation = &"Stand To Roll"
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_durg8"]
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_3il3w"]
[sub_resource type="AnimationNodeTransition" id="AnimationNodeTransition_mfg0f"]
sync = true
xfade_time = 0.3
input_0/name = "locomotion"
input_0/auto_advance = false
input_0/break_loop_at_end = false
input_0/reset = true
input_1/name = "roll"
input_1/auto_advance = false
input_1/break_loop_at_end = false
input_1/reset = true
input_2/name = "doubleRoll"
input_2/auto_advance = false
input_2/break_loop_at_end = false
input_2/reset = true
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_jjrq4"]
"nodes/Animation 2/node" = SubResource("AnimationNodeAnimation_dj5mk")
"nodes/Animation 2/position" = Vector2(-508.316, 402.128)
nodes/LocomotionBlendspace/node = SubResource("AnimationNodeBlendSpace2D_4j2fv")
nodes/LocomotionBlendspace/position = Vector2(-1000, -220)
"nodes/Roll anim/node" = SubResource("AnimationNodeAnimation_er75r")
"nodes/Roll anim/position" = Vector2(-520, 200)
nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_3il3w")
nodes/TimeScale/position = Vector2(-320, 180)
"nodes/TimeScale 2/node" = SubResource("AnimationNodeTimeScale_durg8")
"nodes/TimeScale 2/position" = Vector2(-300, 380)
nodes/Transition/node = SubResource("AnimationNodeTransition_mfg0f")
nodes/Transition/position = Vector2(-100, -160)
nodes/output/position = Vector2(140, 0)
node_connections = [&"TimeScale", 0, &"Roll anim", &"TimeScale 2", 0, &"Animation 2", &"Transition", 0, &"LocomotionBlendspace", &"Transition", 1, &"TimeScale", &"Transition", 2, &"TimeScale 2", &"output", 0, &"Transition"]
[node name="Player" type="CharacterBody3D"]
script = ExtResource("1_38iga")
[node name="AnimNotify" type="Node" parent="." node_paths=PackedStringArray("animationPlayer", "animationTree")]
script = ExtResource("2_s6gd6")
animationPlayer = NodePath("../XBot2/AnimationPlayer")
animationTree = NodePath("../AnimationTree")
[node name="PlayerStateMachine" type="Node" parent="." node_paths=PackedStringArray("animationTree", "animationNotify", "characterMovement", "cameraController", "owner", "defaultState")]
unique_name_in_owner = true
script = ExtResource("3_qdcd8")
animationTree = NodePath("../AnimationTree")
animationNotify = NodePath("../AnimNotify")
characterMovement = NodePath("../MovementController")
cameraController = NodePath("../CameraController")
owner = NodePath("..")
defaultState = NodePath("IdleState")
activateOnReady = true
[node name="IdleState" type="Node" parent="PlayerStateMachine"]
script = ExtResource("4_0y3wl")
transitionName = "locomotion"
id = "Idle"
[node name="WalkState" type="Node" parent="PlayerStateMachine"]
script = ExtResource("5_l6jgd")
movementMode = SubResource("Resource_h2cpj")
transitionName = "locomotion"
id = "Walk"
[node name="RunState" type="Node" parent="PlayerStateMachine"]
script = ExtResource("5_l6jgd")
movementMode = SubResource("Resource_gjtqv")
transitionName = "locomotion"
id = "Run"
[node name="RollState" type="Node" parent="PlayerStateMachine"]
script = ExtResource("7_ye038")
noInputDirectionTypeFallback = 0
transitionName = "roll"
id = "Roll"
canTransitionToSelf = true
[node name="DoubleRollState" type="Node" parent="PlayerStateMachine"]
script = ExtResource("7_ye038")
transitionName = "doubleRoll"
id = "DoubleRoll"
canTransitionToSelf = true
[node name="MovementController" type="Node" parent="." node_paths=PackedStringArray("animationTree")]
unique_name_in_owner = true
script = ExtResource("1_trsp8")
defaultMovementMode = SubResource("Resource_rjvy2")
animationTree = NodePath("../AnimationTree")
[node name="CameraController" type="Node3D" parent="." node_paths=PackedStringArray("characterToFollow")]
unique_name_in_owner = true
top_level = true
script = ExtResource("1_8tlkf")
characterToFollow = NodePath("..")
inputType = 1
[node name="SpringArm3D" type="SpringArm3D" parent="CameraController"]
transform = Transform3D(0.707107, -0.5, 0.5, 0, 0.707107, 0.707107, -0.707107, -0.5, 0.5, 0, 0.9, 0)
collision_mask = 0
spring_length = 15.0
[node name="Camera3D" type="Camera3D" parent="CameraController/SpringArm3D"]
attributes = ExtResource("2_cps54")
fov = 25.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
shape = SubResource("CapsuleShape3D_inwpe")
[node name="XBot2" parent="." instance=ExtResource("2_mdp28")]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
[node name="Skeleton3D" parent="XBot2/XBot" index="0"]
bones/0/position = Vector3(-0.0094865, 1.25185e-09, 0.0105013)
bones/1/position = Vector3(-6.41051e-08, 1.01664, 0.0152059)
bones/1/rotation = Quaternion(-0.00179556, 0.0132419, -0.0480843, 0.998754)
bones/1/scale = Vector3(1, 1, 1)
bones/2/rotation = Quaternion(-0.0736139, -0.0134737, 0.0248121, 0.996887)
bones/3/rotation = Quaternion(-0.00239047, -0.00699569, 0.0513199, 0.998655)
bones/4/rotation = Quaternion(0.0104128, -0.000845129, 0.0512795, 0.99863)
bones/5/rotation = Quaternion(0.00871049, -0.000173571, -0.0189319, 0.999783)
bones/6/rotation = Quaternion(0.0126036, 0.0132224, -0.0693042, 0.997428)
bones/8/rotation = Quaternion(-0.499466, 0.604869, -0.464923, -0.410503)
bones/8/scale = Vector3(1, 1, 1)
bones/9/rotation = Quaternion(0.560569, -0.0574147, -0.0996368, 0.820084)
bones/9/scale = Vector3(1, 1, 1)
bones/10/rotation = Quaternion(1.8569e-07, 0.0161147, -0.153321, 0.988045)
bones/11/rotation = Quaternion(0.0963542, 0.0892781, 0.0727252, 0.988664)
bones/12/rotation = Quaternion(0.20961, -0.115532, -0.245184, 0.939468)
bones/13/rotation = Quaternion(-0.0328722, 0.117535, 0.240875, 0.962852)
bones/14/rotation = Quaternion(0.0098325, 0.00866698, 0.0611068, 0.998045)
bones/15/rotation = Quaternion(0.00577591, -0.11751, -0.0487442, 0.991858)
bones/16/rotation = Quaternion(0.076983, 0.000872834, 0.0413773, 0.996173)
bones/17/rotation = Quaternion(0.187029, 0.00118425, 0.0259622, 0.982011)
bones/18/rotation = Quaternion(0.129271, 0.00198141, 0.00248517, 0.991604)
bones/19/rotation = Quaternion(-4.38752e-06, 0.00100281, 8.70747e-05, 0.999999)
bones/19/scale = Vector3(1, 1, 1)
bones/20/rotation = Quaternion(0.145602, 0.000472066, 0.0766729, 0.986368)
bones/21/rotation = Quaternion(0.295346, 0.00265771, 0.0372965, 0.954658)
bones/22/rotation = Quaternion(0.146972, 0.000127494, 0.0154105, 0.989021)
bones/23/rotation = Quaternion(-4.20033e-06, 0.000929157, 0.000166562, 1)
bones/24/rotation = Quaternion(0.207537, -0.00143193, 0.101306, 0.972966)
bones/25/rotation = Quaternion(0.321751, -0.00227888, 0.0346621, 0.946187)
bones/25/scale = Vector3(1, 1, 1)
bones/26/rotation = Quaternion(0.132543, 0.00115782, -0.00290896, 0.991172)
bones/27/rotation = Quaternion(1.16963e-07, 0.000146031, -0.000799608, 1)
bones/27/scale = Vector3(1, 1, 1)
bones/28/rotation = Quaternion(0.286267, -0.0114882, 0.143446, 0.947282)
bones/29/rotation = Quaternion(0.366356, 0.00288045, 0.0361342, 0.929769)
bones/30/rotation = Quaternion(0.169731, 0.0059579, -0.00192036, 0.985471)
bones/31/rotation = Quaternion(-5.56963e-06, 0.00156976, -4.12096e-05, 0.999999)
bones/31/scale = Vector3(1, 1, 1)
bones/32/rotation = Quaternion(0.543159, 0.554221, -0.424813, 0.46621)
bones/32/scale = Vector3(1, 1, 1)
bones/33/rotation = Quaternion(0.676318, 0.0859955, 0.0300173, 0.730956)
bones/34/rotation = Quaternion(7.64858e-07, -0.0131976, 0.125566, 0.991998)
bones/35/rotation = Quaternion(0.0846856, -0.232848, -0.0325239, 0.968273)
bones/36/rotation = Quaternion(0.209579, 0.11587, 0.244299, 0.939664)
bones/37/rotation = Quaternion(-0.0324759, -0.117633, -0.239861, 0.963107)
bones/37/scale = Vector3(1, 1, 1)
bones/38/rotation = Quaternion(0.002646, -0.00797333, -0.0674098, 0.99769)
bones/39/rotation = Quaternion(0.00515115, 0.122683, 0.0416519, 0.991558)
bones/39/scale = Vector3(1, 1, 1)
bones/40/rotation = Quaternion(0.076984, -0.000888905, -0.0415842, 0.996164)
bones/41/rotation = Quaternion(0.187036, -0.00111654, -0.0256068, 0.982019)
bones/42/rotation = Quaternion(0.0974016, -0.000353537, -0.00808231, 0.995212)
bones/43/rotation = Quaternion(-4.301e-06, -0.000377563, -1.30879e-05, 1)
bones/44/rotation = Quaternion(0.145602, -0.000549914, -0.0771981, 0.986327)
bones/45/rotation = Quaternion(0.295354, -0.00240048, -0.036463, 0.954689)
bones/46/rotation = Quaternion(0.115547, 9.80968e-05, -0.0139298, 0.993204)
bones/47/rotation = Quaternion(2.8699e-08, -0.00102401, 2.80073e-05, 0.999999)
bones/48/rotation = Quaternion(0.207545, 0.00146526, -0.101148, 0.972981)
bones/49/rotation = Quaternion(0.321757, 0.00220729, -0.0348695, 0.946177)
bones/50/rotation = Quaternion(0.14565, 0.00178051, -0.0143766, 0.98923)
bones/52/rotation = Quaternion(0.286229, 0.012221, -0.141014, 0.947649)
bones/53/rotation = Quaternion(0.366355, -0.00264843, -0.0355409, 0.929793)
bones/54/rotation = Quaternion(0.155789, -0.000245093, -0.0231177, 0.98752)
bones/55/scale = Vector3(1, 1, 1)
bones/56/rotation = Quaternion(-0.0408944, 0.023228, 0.994313, -0.0955542)
bones/57/rotation = Quaternion(-0.138434, 0.0462629, 0.0241615, 0.988996)
bones/58/rotation = Quaternion(0.532354, -0.0301416, -0.062088, 0.843703)
bones/58/scale = Vector3(1, 1, 1)
bones/59/rotation = Quaternion(0.340057, 5.86679e-08, -2.64737e-07, 0.940405)
bones/60/rotation = Quaternion(3.66699e-08, 0.0116081, 4.25779e-10, 0.999933)
bones/61/rotation = Quaternion(0.114339, 0.173645, 0.970395, -0.122915)
bones/61/scale = Vector3(1, 1, 1)
bones/62/rotation = Quaternion(-0.24838, -0.0782927, 0.0351752, 0.964852)
bones/63/rotation = Quaternion(0.487247, -0.0631822, -0.0782306, 0.867455)
bones/64/rotation = Quaternion(0.339131, 1.59574e-07, -4.75502e-07, 0.940739)
bones/65/rotation = Quaternion(4.9911e-08, -0.0118692, -5.92394e-10, 0.99993)
[node name="AnimationTree" type="AnimationTree" parent="."]
unique_name_in_owner = true
root_node = NodePath("%AnimationTree/../XBot2")
root_motion_track = NodePath("XBot/Skeleton3D:mixamorig_Root")
tree_root = SubResource("AnimationNodeBlendTree_jjrq4")
anim_player = NodePath("../XBot2/AnimationPlayer")
parameters/LocomotionBlendspace/blend_position = Vector2(0, 0)
parameters/TimeScale/scale = 2.0
"parameters/TimeScale 2/scale" = 2.0
parameters/Transition/current_state = "locomotion"
parameters/Transition/transition_request = ""
parameters/Transition/current_index = 0
[node name="RootMotionView" type="RootMotionView" parent="."]
animation_path = NodePath("../AnimationTree")
[editable path="XBot2"]