trenches/godot/objects/player.tscn

270 lines
14 KiB
Plaintext

[gd_scene load_steps=28 format=3 uid="uid://1kr3qqan3trk"]
[ext_resource type="PackedScene" uid="uid://vub54xgk5n0h" path="res://models/character.glb" id="1_mi4co"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ukhqm"]
animation = &"Aim"
play_mode = 1
use_custom_timeline = true
timeline_length = 0.4
stretch_time_scale = false
start_offset = 0.0
loop_mode = 0
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_nhlru"]
animation = &"Aim"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_8rbkq"]
animation = &"Aim_Fire"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_dqnnp"]
animation = &"RESET"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_7ceai"]
animation = &"RESET"
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_rb1jd"]
filter_enabled = true
filters = ["Character/Skeleton3D:Foot.L", "Character/Skeleton3D:Foot.R", "Character/Skeleton3D:IKTarget.Foot.L", "Character/Skeleton3D:IKTarget.Foot.R", "Character/Skeleton3D:hip", "Character/Skeleton3D:lowerleg.L", "Character/Skeleton3D:lowerleg.R", "Character/Skeleton3D:root", "Character/Skeleton3D:upperleg.L", "Character/Skeleton3D:upperleg.R"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_psu0r"]
animation = &"Walk_forward"
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_2mbyh"]
graph_offset = Vector2(-703.5, -8.5)
nodes/Base/node = SubResource("AnimationNodeAnimation_7ceai")
nodes/Base/position = Vector2(-120, 120)
nodes/Forward/node = SubResource("AnimationNodeBlend2_rb1jd")
nodes/Forward/position = Vector2(100, 120)
nodes/Walk/node = SubResource("AnimationNodeAnimation_psu0r")
nodes/Walk/position = Vector2(-140, 300)
node_connections = [&"Forward", 0, &"Base", &"Forward", 1, &"Walk", &"output", 0, &"Forward"]
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_3mk5o"]
xfade_time = 0.2
advance_mode = 2
advance_expression = "get_input_directions().y > 0.5"
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_mf4y3"]
xfade_time = 0.2
priority = 2
advance_mode = 2
advance_expression = "get_input_directions().y <= 0.5"
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_c81tj"]
advance_mode = 2
advance_expression = "get_input_directions().y < -0.9"
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_r26s5"]
advance_mode = 2
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_4lybd"]
switch_mode = 2
advance_mode = 2
advance_expression = "get_input_directions().y >= -0.9"
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_4im1q"]
priority = 2
switch_mode = 2
advance_mode = 2
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_5aafd"]
switch_mode = 2
advance_mode = 2
advance_expression = "get_input_direction() > 0.f"
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_8f4gl"]
priority = 2
switch_mode = 2
advance_mode = 2
advance_expression = "get_input_fire()"
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_xnat3"]
reset = false
switch_mode = 2
advance_mode = 2
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_12bos"]
advance_mode = 2
advance_expression = "get_input_directions().y < -0.5"
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_7smdg"]
"states/Aim Down [aim]/node" = SubResource("AnimationNodeAnimation_ukhqm")
"states/Aim Down [aim]/position" = Vector2(537, 197.5)
"states/Aim [aim] [turn]/node" = SubResource("AnimationNodeAnimation_nhlru")
"states/Aim [aim] [turn]/position" = Vector2(537, 98)
states/End/position = Vector2(204, 197.5)
"states/Fire [aim]/node" = SubResource("AnimationNodeAnimation_8rbkq")
"states/Fire [aim]/position" = Vector2(752.5, 98)
"states/Idle [turn_animated]/node" = SubResource("AnimationNodeAnimation_dqnnp")
"states/Idle [turn_animated]/position" = Vector2(338, 100)
states/Start/position = Vector2(204, 100)
"states/Walk [turn]/node" = SubResource("AnimationNodeBlendTree_2mbyh")
"states/Walk [turn]/position" = Vector2(338, 197.5)
transitions = ["Idle [turn_animated]", "Walk [turn]", SubResource("AnimationNodeStateMachineTransition_3mk5o"), "Walk [turn]", "Idle [turn_animated]", SubResource("AnimationNodeStateMachineTransition_mf4y3"), "Idle [turn_animated]", "Aim [aim] [turn]", SubResource("AnimationNodeStateMachineTransition_c81tj"), "Start", "Idle [turn_animated]", SubResource("AnimationNodeStateMachineTransition_r26s5"), "Aim [aim] [turn]", "Aim Down [aim]", SubResource("AnimationNodeStateMachineTransition_4lybd"), "Aim Down [aim]", "Idle [turn_animated]", SubResource("AnimationNodeStateMachineTransition_4im1q"), "Aim Down [aim]", "Walk [turn]", SubResource("AnimationNodeStateMachineTransition_5aafd"), "Aim [aim] [turn]", "Fire [aim]", SubResource("AnimationNodeStateMachineTransition_8f4gl"), "Fire [aim]", "Aim [aim] [turn]", SubResource("AnimationNodeStateMachineTransition_xnat3"), "Walk [turn]", "Aim [aim] [turn]", SubResource("AnimationNodeStateMachineTransition_12bos")]
graph_offset = Vector2(-351.759, -7)
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_cwpxw"]
filter_enabled = true
filters = ["Character/Skeleton3D:Foot.L", "Character/Skeleton3D:Foot.R", "Character/Skeleton3D:IKTarget.Foot.L", "Character/Skeleton3D:IKTarget.Foot.R", "Character/Skeleton3D:PoleTarget.Foot.L", "Character/Skeleton3D:PoleTarget.Foot.R", "Character/Skeleton3D:hip", "Character/Skeleton3D:lowerleg.L", "Character/Skeleton3D:lowerleg.R", "Character/Skeleton3D:spine.001", "Character/Skeleton3D:upperleg.L", "Character/Skeleton3D:upperleg.R"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ltmcj"]
animation = &"Turn_left"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_1g6a2"]
animation = &"Turn_right"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_dgkx8"]
animation = &"RESET"
[sub_resource type="AnimationNodeBlendSpace1D" id="AnimationNodeBlendSpace1D_ajqf0"]
blend_point_0/node = SubResource("AnimationNodeAnimation_ltmcj")
blend_point_0/pos = 1.0
blend_point_1/node = SubResource("AnimationNodeAnimation_1g6a2")
blend_point_1/pos = -1.0
blend_point_2/node = SubResource("AnimationNodeAnimation_dgkx8")
blend_point_2/pos = 0.0
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_hiswf"]
graph_offset = Vector2(-203, -3.5)
nodes/Actions/node = SubResource("AnimationNodeStateMachine_7smdg")
nodes/Actions/position = Vector2(-80, 140)
nodes/TurnAnimation/node = SubResource("AnimationNodeBlend2_cwpxw")
nodes/TurnAnimation/position = Vector2(120, 140)
nodes/TurnDirection/node = SubResource("AnimationNodeBlendSpace1D_ajqf0")
nodes/TurnDirection/position = Vector2(-80, 300)
node_connections = [&"TurnAnimation", 0, &"Actions", &"TurnAnimation", 1, &"TurnDirection", &"output", 0, &"TurnAnimation"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_ewsvd"]
radius = 0.370388
[node name="Player" type="Player"]
slide_on_ceiling = false
floor_constant_speed = true
[node name="PlayerInput" type="PlayerInput" parent="."]
unique_name_in_owner = true
[node name="CharacterModel" parent="." instance=ExtResource("1_mi4co")]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0337329, 0)
[node name="Skeleton3D" parent="CharacterModel/Character" index="0"]
bones/0/rotation = Quaternion(1.12928e-22, 1, 2.98023e-08, -1.94707e-07)
bones/1/position = Vector3(3.28472e-17, 0.826102, -2.26306e-09)
bones/1/rotation = Quaternion(-0.0189874, -6.30661e-09, -1.08732e-09, 0.99982)
bones/2/rotation = Quaternion(0.0262842, 8.66579e-09, 1.56723e-09, 0.999655)
bones/3/rotation = Quaternion(-0.013812, -0.124595, 8.42949e-05, 0.992112)
bones/4/rotation = Quaternion(0.0100466, -3.89644e-10, 6.78268e-10, 0.99995)
bones/5/rotation = Quaternion(-0.0233085, 0.0669743, -0.00156502, 0.997481)
bones/6/rotation = Quaternion(0.623077, 0.672557, 0.307599, -0.254607)
bones/7/rotation = Quaternion(-0.311931, -0.528262, 0.360764, 0.702487)
bones/8/rotation = Quaternion(0.385362, 0.19105, 0.552643, 0.71385)
bones/9/rotation = Quaternion(0.204715, 0.0914037, 0.275611, 0.93476)
bones/10/rotation = Quaternion(-0.160687, -0.0459478, -0.0475321, 0.984789)
bones/10/scale = Vector3(1, 1, 1)
bones/11/rotation = Quaternion(-0.0305181, -0.0130498, -0.0216154, 0.999215)
bones/11/scale = Vector3(1, 1, 1)
bones/12/rotation = Quaternion(0.00872478, 0.00565776, 0.00131029, 0.999945)
bones/12/scale = Vector3(1, 1, 1)
bones/13/rotation = Quaternion(-0.617934, -0.0462445, 0.180663, 0.763793)
bones/13/scale = Vector3(1, 1, 1)
bones/14/rotation = Quaternion(-0.23045, 0.0743406, 0.160693, 0.956841)
bones/15/rotation = Quaternion(-0.541263, -0.00752764, 0.238029, 0.806424)
bones/15/scale = Vector3(1, 1, 1)
bones/16/rotation = Quaternion(-0.611023, -0.262913, 0.402215, 0.629087)
bones/16/scale = Vector3(1, 1, 1)
bones/17/rotation = Quaternion(0.0158023, 0.0368156, 0.177499, 0.983305)
bones/18/rotation = Quaternion(-0.115784, 0.0786986, 0.503797, 0.852402)
bones/19/rotation = Quaternion(-0.77808, 0.139756, 0.0140335, 0.612261)
bones/19/scale = Vector3(1, 1, 1)
bones/20/rotation = Quaternion(-0.0923591, 0.0238578, 0.0736642, 0.992711)
bones/21/rotation = Quaternion(-0.193467, 0.101022, 0.0447897, 0.974864)
bones/21/scale = Vector3(1, 1, 1)
bones/22/rotation = Quaternion(-0.293695, -0.10649, 0.259809, 0.91373)
bones/22/scale = Vector3(1, 1, 1)
bones/23/rotation = Quaternion(-0.0310475, -0.0162324, -0.00151601, 0.999385)
bones/24/rotation = Quaternion(0.140362, -0.0289769, -0.195164, 0.970242)
bones/25/rotation = Quaternion(0.585184, -0.476496, -0.473244, -0.454479)
bones/25/scale = Vector3(1, 1, 1)
bones/26/rotation = Quaternion(-0.449756, 0.301541, -0.311322, 0.780943)
bones/27/rotation = Quaternion(-0.122233, -0.135947, -0.565028, 0.804562)
bones/27/scale = Vector3(1, 1, 1)
bones/28/rotation = Quaternion(0.155387, -0.432411, -0.521703, 0.71882)
bones/29/rotation = Quaternion(-0.0486369, 0.0590467, -0.0759536, 0.994173)
bones/30/rotation = Quaternion(-0.0305179, 0.0130499, 0.0216153, 0.999215)
bones/30/scale = Vector3(1, 1, 1)
bones/31/rotation = Quaternion(-0.518356, -0.00412336, -0.00408933, 0.855145)
bones/32/rotation = Quaternion(-0.290993, 0.0788459, 0.0248015, 0.953148)
bones/33/rotation = Quaternion(-0.419789, -0.067382, -0.039477, 0.904256)
bones/33/scale = Vector3(1, 1, 1)
bones/34/rotation = Quaternion(-0.266884, 0.00530696, 0.00065886, 0.963714)
bones/34/scale = Vector3(1, 1, 1)
bones/35/rotation = Quaternion(-0.422483, 0.214372, -0.00100307, 0.880654)
bones/36/rotation = Quaternion(-0.345783, -0.0439312, -0.261553, 0.900052)
bones/36/scale = Vector3(1, 1, 1)
bones/37/rotation = Quaternion(-0.0107008, 0.00769689, 0.00365465, 0.999906)
bones/37/scale = Vector3(1, 1, 1)
bones/38/rotation = Quaternion(-0.389883, 0.108139, -0.120461, 0.906524)
bones/39/rotation = Quaternion(-0.399909, -0.0921328, -0.130163, 0.902575)
bones/40/rotation = Quaternion(-0.0125688, 0.0114118, 0.00134584, 0.999855)
bones/40/scale = Vector3(1, 1, 1)
bones/41/rotation = Quaternion(-0.0497163, 0.0839878, -0.166226, 0.981246)
bones/42/rotation = Quaternion(-0.0310476, 0.0162325, 0.00151597, 0.999385)
bones/43/rotation = Quaternion(-0.00109126, -0.0104143, 0.0283538, 0.999543)
bones/44/position = Vector3(0.16719, 0.195796, -0.0454406)
bones/44/rotation = Quaternion(-0.610992, 0.0971646, 0.14821, 0.771545)
bones/45/rotation = Quaternion(-0.82326, 4.1804e-09, -1.03579e-07, 0.567665)
bones/46/position = Vector3(8.07956e-09, 0.0363644, 0.0392254)
bones/46/rotation = Quaternion(-0.00112372, -6.23921e-08, 6.44731e-09, 0.999999)
bones/48/rotation = Quaternion(0.706312, -2.22455e-08, 6.70979e-08, 0.707901)
bones/48/scale = Vector3(1, 1, 1)
bones/49/position = Vector3(0.0228929, -0.0282939, -0.00824324)
bones/49/rotation = Quaternion(-0.112129, 0.585203, -0.155744, 0.78785)
bones/49/scale = Vector3(1, 1, 1)
bones/50/rotation = Quaternion(0.31578, 0.920316, 0.115311, -0.200014)
bones/50/scale = Vector3(1, 1, 1)
bones/51/rotation = Quaternion(0.997309, -0.00549226, 0.0715033, -0.015225)
bones/51/scale = Vector3(1, 1, 1)
bones/52/rotation = Quaternion(-0.00225666, 0.00306653, -0.000453776, 0.999993)
bones/52/scale = Vector3(1, 1, 1)
bones/53/rotation = Quaternion(0.665461, 0.000165138, -0.00238783, 0.746429)
bones/54/rotation = Quaternion(0.997309, 0.00549226, -0.0715033, -0.015225)
bones/54/scale = Vector3(1, 1, 1)
bones/55/rotation = Quaternion(-0.00225666, -0.0030665, 0.000453778, 0.999993)
bones/55/scale = Vector3(1, 1, 1)
bones/56/rotation = Quaternion(0.665461, -0.000165001, 0.00238774, 0.746429)
bones/56/scale = Vector3(1, 1, 1)
bones/57/rotation = Quaternion(-2.99921e-13, 0.707107, 0.707107, -2.99921e-13)
bones/58/rotation = Quaternion(2.01446e-13, 0.707107, 0.707107, 2.01446e-13)
bones/59/rotation = Quaternion(-0.707107, 1.25097e-07, 1.25097e-07, 0.707107)
bones/60/rotation = Quaternion(-0.707107, 1.25097e-07, 1.25097e-07, 0.707107)
bones/61/rotation = Quaternion(-0.707107, 1.5189e-07, 1.5189e-07, 0.707107)
bones/62/rotation = Quaternion(-0.707107, 1.5189e-07, 1.5189e-07, 0.707107)
[node name="AnimationTree" type="AnimationTree" parent="CharacterModel"]
unique_name_in_owner = true
root_node = NodePath("%AnimationTree/..")
root_motion_track = NodePath("Character/Skeleton3D:root")
tree_root = SubResource("AnimationNodeBlendTree_hiswf")
advance_expression_base_node = NodePath("../..")
anim_player = NodePath("../AnimationPlayer")
"parameters/Actions/Walk [turn]/Forward/blend_amount" = 1.0
parameters/TurnAnimation/blend_amount = 0
parameters/TurnDirection/blend_position = -1.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
shape = SubResource("CapsuleShape3D_ewsvd")
[node name="CameraParent" type="Node3D" parent="."]
unique_name_in_owner = true
top_level = true
[node name="Camera" type="Camera3D" parent="CameraParent"]
transform = Transform3D(-0.99874, 0.00857726, -0.0494361, -1.83936e-08, 0.98528, 0.170948, 0.0501747, 0.170733, -0.984039, -0.510957, 1.68471, -1.00759)
fov = 42.5804
far = 100.0
[editable path="CharacterModel"]