315 lines
14 KiB
Plaintext
315 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 = 360.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(-600, -140)
|
|
"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("..")
|
|
enableInput = false
|
|
rotatePlayer = false
|
|
|
|
[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.98528e-08, 1.0277, 0.0153483)
|
|
bones/1/rotation = Quaternion(-0.0299539, -0.36772, -0.0121686, 0.929374)
|
|
bones/1/scale = Vector3(1, 1, 1)
|
|
bones/2/rotation = Quaternion(-0.029804, 0.0412832, -0.00444647, 0.998693)
|
|
bones/3/rotation = Quaternion(0.100643, 0.0829519, -0.00643562, 0.991438)
|
|
bones/4/rotation = Quaternion(0.11341, 0.082862, -0.00750396, 0.990058)
|
|
bones/5/rotation = Quaternion(-0.03756, -0.0112204, 0.000859207, 0.999231)
|
|
bones/6/rotation = Quaternion(-0.0544206, 0.177227, 0.00865648, 0.982626)
|
|
bones/8/rotation = Quaternion(-0.579974, 0.502586, -0.515842, -0.380717)
|
|
bones/8/scale = Vector3(1, 1, 1)
|
|
bones/9/rotation = Quaternion(0.477713, 0.052378, 0.0945921, 0.871837)
|
|
bones/9/scale = Vector3(1, 1, 1)
|
|
bones/10/rotation = Quaternion(0.0446996, 0.029114, -0.359539, 0.931604)
|
|
bones/11/rotation = Quaternion(0.106754, -0.0646036, -0.10112, 0.987018)
|
|
bones/12/rotation = Quaternion(0.233202, 0.145699, -0.20617, 0.939086)
|
|
bones/13/rotation = Quaternion(-0.0431753, 0.000711064, 0.1877, 0.981277)
|
|
bones/14/rotation = Quaternion(-0.0016657, -0.000807656, 0.00691934, 0.999974)
|
|
bones/15/rotation = Quaternion(0.00577591, -0.11751, -0.0487442, 0.991858)
|
|
bones/16/rotation = Quaternion(0.0395755, 0.00997601, 0.0100787, 0.999116)
|
|
bones/17/rotation = Quaternion(0.147281, 0.000491134, 0.0101569, 0.989042)
|
|
bones/18/rotation = Quaternion(1.05725e-05, -1.8822e-07, -8.80717e-05, 1)
|
|
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.11099, 0.00848848, 0.0240655, 0.993494)
|
|
bones/21/rotation = Quaternion(0.263547, 0.00145656, -0.0162155, 0.964509)
|
|
bones/22/rotation = Quaternion(2.01072e-06, -2.82134e-07, -0.000321912, 1)
|
|
bones/23/rotation = Quaternion(-4.20033e-06, 0.000929157, 0.000166562, 1)
|
|
bones/24/rotation = Quaternion(0.186998, -0.00841205, 0.0675611, 0.979998)
|
|
bones/25/rotation = Quaternion(0.320396, -0.00244664, -0.0342687, 0.946661)
|
|
bones/25/scale = Vector3(1, 1, 1)
|
|
bones/26/rotation = Quaternion(2.07526e-06, 2.07746e-08, -0.000112557, 1)
|
|
bones/27/rotation = Quaternion(1.16963e-07, 0.000146031, -0.000799608, 1)
|
|
bones/27/scale = Vector3(1, 1, 1)
|
|
bones/28/rotation = Quaternion(0.207746, -0.020696, 0.0882186, 0.973977)
|
|
bones/29/rotation = Quaternion(0.349305, -0.0117833, -0.067892, 0.934472)
|
|
bones/30/rotation = Quaternion(5.61877e-06, -2.38827e-07, -0.00049686, 1)
|
|
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.525951, 0.544071, -0.54701, 0.35797)
|
|
bones/32/scale = Vector3(1, 1, 1)
|
|
bones/33/rotation = Quaternion(0.510818, -0.0627656, 0.138661, 0.846108)
|
|
bones/34/rotation = Quaternion(-0.0125484, 0.0578293, 0.404985, 0.912406)
|
|
bones/35/rotation = Quaternion(-0.162766, 0.140065, 0.0151678, 0.976555)
|
|
bones/36/rotation = Quaternion(0.307937, -0.0089344, 0.161255, 0.937599)
|
|
bones/37/rotation = Quaternion(-0.00937778, 0.00174634, -0.00701192, 0.99993)
|
|
bones/37/scale = Vector3(1, 1, 1)
|
|
bones/38/rotation = Quaternion(-0.00153038, 0.000745069, -0.0060738, 0.99998)
|
|
bones/39/rotation = Quaternion(0.00515115, 0.122683, 0.0416519, 0.991558)
|
|
bones/39/scale = Vector3(1, 1, 1)
|
|
bones/40/rotation = Quaternion(0.0326842, -0.005891, 0.0610618, 0.997581)
|
|
bones/41/rotation = Quaternion(0.142788, -0.000761521, -0.00690043, 0.989729)
|
|
bones/42/rotation = Quaternion(2.20277e-06, -7.01971e-08, -6.63367e-05, 1)
|
|
bones/43/rotation = Quaternion(-4.301e-06, -0.000377563, -1.30879e-05, 1)
|
|
bones/44/rotation = Quaternion(0.124651, 0.00607029, -0.0858307, 0.988463)
|
|
bones/45/rotation = Quaternion(0.189666, -0.00166462, 0.0146905, 0.981737)
|
|
bones/46/rotation = Quaternion(-4.03633e-06, -2.86042e-07, 2.04936e-05, 1)
|
|
bones/47/rotation = Quaternion(2.8699e-08, -0.00102401, 2.80073e-05, 0.999999)
|
|
bones/48/rotation = Quaternion(0.264953, -0.013301, -0.130867, 0.955247)
|
|
bones/49/rotation = Quaternion(0.27558, 0.00173527, 0.0235541, 0.960988)
|
|
bones/50/rotation = Quaternion(-4.04939e-06, -4.14508e-07, -6.19588e-07, 1)
|
|
bones/52/rotation = Quaternion(0.290944, -0.0134275, -0.162034, 0.942823)
|
|
bones/53/rotation = Quaternion(0.33612, 0.0116337, 0.049425, 0.94045)
|
|
bones/54/rotation = Quaternion(8.52048e-06, 4.23118e-07, -6.65489e-05, 1)
|
|
bones/55/scale = Vector3(1, 1, 1)
|
|
bones/56/rotation = Quaternion(-0.125185, 0.041323, 0.983712, 0.122192)
|
|
bones/57/rotation = Quaternion(-0.321478, 0.0760856, -0.0240363, 0.943549)
|
|
bones/58/rotation = Quaternion(0.605812, 0.0642597, 0.129458, 0.78237)
|
|
bones/58/scale = Vector3(1, 1, 1)
|
|
bones/59/rotation = Quaternion(0.349854, 0.00382453, -0.00189273, 0.936795)
|
|
bones/60/rotation = Quaternion(3.66699e-08, 0.0116081, 4.25779e-10, 0.999933)
|
|
bones/61/rotation = Quaternion(0.07882, 0.224764, 0.965855, -0.101941)
|
|
bones/61/scale = Vector3(1, 1, 1)
|
|
bones/62/rotation = Quaternion(-0.324811, 0.11812, -0.0338818, 0.937762)
|
|
bones/63/rotation = Quaternion(0.500957, -0.0282444, -0.0572155, 0.863117)
|
|
bones/64/rotation = Quaternion(0.354274, 0.0164946, -0.0237669, 0.934694)
|
|
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 = "roll"
|
|
parameters/Transition/transition_request = ""
|
|
parameters/Transition/current_index = 1
|
|
|
|
[node name="RootMotionView" type="RootMotionView" parent="."]
|
|
animation_path = NodePath("../AnimationTree")
|
|
|
|
[editable path="XBot2"]
|