Added autocannon weapon

This commit is contained in:
Rob Kelly 2024-07-25 16:56:09 -06:00
parent b519191e86
commit deb6158290
14 changed files with 600 additions and 93 deletions

View File

@ -7,5 +7,6 @@ signal stomp
func _stomp() -> void:
@warning_ignore("unsafe_cast")
if (animation_tree["parameters/walk_space/blend_position"] as Vector2).length() > 0.1:
stomp.emit()

View File

@ -1329,43 +1329,43 @@ parameters/walk_scale/scale = 1.0
parameters/walk_space/blend_position = Vector2(0, 0)
[node name="Skeleton3D" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5" index="0"]
bones/1/position = Vector3(0, 0, 6.45939)
bones/1/position = Vector3(0, 0, 6.22888)
bones/1/rotation = Quaternion(0.707107, 0, 0, 0.707107)
bones/2/rotation = Quaternion(1.54543e-08, 1.54543e-08, -0.707107, 0.707107)
bones/3/rotation = Quaternion(0.655406, 0.674773, 0.236536, 0.24326)
bones/3/rotation = Quaternion(0.650943, 0.670731, 0.247765, 0.254961)
bones/3/scale = Vector3(1, 1, 1)
bones/4/rotation = Quaternion(0.69929, 0.0562966, 0.0723151, 0.708939)
bones/4/rotation = Quaternion(0.737087, 0.0535668, 0.0763486, 0.669331)
bones/4/scale = Vector3(1, 1, 1)
bones/5/rotation = Quaternion(-0.620845, -0.00141104, -0.101282, 0.777362)
bones/5/rotation = Quaternion(-0.652932, -0.00101165, -0.105891, 0.749977)
bones/5/scale = Vector3(1, 1, 1)
bones/6/rotation = Quaternion(-0.435516, 0.0113681, -0.0628704, 0.897911)
bones/7/rotation = Quaternion(-0.840138, 0.036654, -0.173712, 0.512492)
bones/6/rotation = Quaternion(-0.430725, 0.0118466, -0.0624951, 0.900239)
bones/7/rotation = Quaternion(-0.85053, 0.0348597, -0.176768, 0.494101)
bones/7/scale = Vector3(1, 1, 1)
bones/9/rotation = Quaternion(-0.577893, -0.0977404, -0.0868737, 0.805568)
bones/11/rotation = Quaternion(-0.836535, 0.0432889, -0.169131, 0.519355)
bones/11/rotation = Quaternion(-0.847169, 0.0411824, -0.172269, 0.50093)
bones/11/scale = Vector3(1, 1, 1)
bones/13/rotation = Quaternion(-0.583833, -0.0928994, -0.0936977, 0.80108)
bones/13/scale = Vector3(1, 1, 1)
bones/15/rotation = Quaternion(0.993231, -0.0067672, 0.0811647, 0.0828119)
bones/15/scale = Vector3(1, 1, 1)
bones/17/rotation = Quaternion(0.75201, 0.0100898, 0.658999, 0.0100006)
bones/17/rotation = Quaternion(0.750942, 0.0224669, 0.65936, 0.0287472)
bones/17/scale = Vector3(1, 1, 1)
bones/19/rotation = Quaternion(-0.399104, -0.525183, -0.304683, 0.687072)
bones/19/scale = Vector3(0.999999, 1, 1)
bones/21/rotation = Quaternion(0.855906, -0.0322478, 0.0593455, 0.512701)
bones/23/rotation = Quaternion(0.900801, 0.00355218, 0.148661, 0.407976)
bones/23/rotation = Quaternion(0.869441, 0.00331343, 0.14354, 0.472713)
bones/23/scale = Vector3(1, 1, 1)
bones/25/rotation = Quaternion(-0.715396, -0.0713077, -0.0634678, 0.692168)
bones/25/scale = Vector3(1, 1, 1)
bones/27/rotation = Quaternion(-0.552631, -0.00578587, -0.102834, 0.827037)
bones/27/rotation = Quaternion(-0.598704, -0.00499813, -0.109321, 0.79346)
bones/29/rotation = Quaternion(0.808854, -0.0303334, 0.0651724, 0.583599)
bones/31/rotation = Quaternion(0.808854, -0.0303334, 0.0651724, 0.583599)
bones/33/rotation = Quaternion(-0.544762, -0.00992925, -0.107889, 0.831562)
bones/35/rotation = Quaternion(-0.631914, 0.00360494, -0.102775, 0.768186)
bones/33/rotation = Quaternion(-0.59128, -0.00909081, -0.114231, 0.798284)
bones/35/rotation = Quaternion(-0.678808, 0.00411817, -0.109739, 0.726058)
bones/35/scale = Vector3(1, 1, 1)
bones/37/scale = Vector3(1, 1, 1)
bones/39/scale = Vector3(1, 1, 1)
bones/41/rotation = Quaternion(-0.0147806, 0.935854, 0.351872, 0.0120522)
bones/41/rotation = Quaternion(-0.0150671, 0.942013, 0.335018, 0.0121359)
bones/41/scale = Vector3(1, 1, 1)
bones/43/rotation = Quaternion(-0.015884, 0.718179, -0.69565, -0.00621676)
bones/43/scale = Vector3(1, 1, 1)
@ -1388,37 +1388,37 @@ bones/66/rotation = Quaternion(-0.000385918, -2.26638e-14, 0.000401128, 1)
bones/68/rotation = Quaternion(-0.706834, 0.000283644, -0.000283644, 0.70738)
bones/70/rotation = Quaternion(-0.707107, 4.67924e-24, 4.67924e-24, 0.707107)
bones/73/rotation = Quaternion(1.54543e-08, -1.54543e-08, 0.707107, 0.707107)
bones/74/rotation = Quaternion(-0.655406, 0.674773, 0.236536, -0.24326)
bones/74/rotation = Quaternion(-0.650943, 0.670731, 0.247765, -0.254961)
bones/74/scale = Vector3(1, 1, 1)
bones/75/rotation = Quaternion(0.69929, -0.0562966, -0.0723151, 0.708939)
bones/75/rotation = Quaternion(0.737087, -0.0535668, -0.0763486, 0.669331)
bones/75/scale = Vector3(1, 1, 1)
bones/76/rotation = Quaternion(-0.620845, 0.00141104, 0.101282, 0.777362)
bones/76/rotation = Quaternion(-0.652932, 0.00101167, 0.105891, 0.749977)
bones/76/scale = Vector3(1, 1, 1)
bones/77/rotation = Quaternion(-0.435516, -0.0113681, 0.0628704, 0.897911)
bones/77/rotation = Quaternion(-0.430725, -0.0118466, 0.062495, 0.900239)
bones/77/scale = Vector3(1, 1, 1)
bones/78/rotation = Quaternion(-0.840138, -0.036654, 0.173711, 0.512492)
bones/78/rotation = Quaternion(-0.850535, -0.0349077, 0.176691, 0.494117)
bones/78/scale = Vector3(1, 1, 1)
bones/82/rotation = Quaternion(-0.836535, -0.0432889, 0.169132, 0.519355)
bones/82/rotation = Quaternion(-0.847169, -0.0411825, 0.172269, 0.500931)
bones/82/scale = Vector3(1, 1, 1)
bones/84/rotation = Quaternion(-0.583833, 0.0928994, 0.0936978, 0.80108)
bones/86/rotation = Quaternion(0.993231, 0.0067672, -0.0811647, 0.0828119)
bones/86/scale = Vector3(1, 1, 1)
bones/88/rotation = Quaternion(0.75201, -0.0100898, -0.658999, 0.0100006)
bones/88/rotation = Quaternion(0.750942, -0.0224667, -0.65936, 0.0287476)
bones/92/rotation = Quaternion(0.855906, 0.0322478, -0.0593455, 0.512701)
bones/92/scale = Vector3(1, 1, 1)
bones/94/rotation = Quaternion(0.900801, -0.00355221, -0.148661, 0.407976)
bones/94/rotation = Quaternion(0.869441, -0.00331339, -0.14354, 0.472713)
bones/94/scale = Vector3(1, 1, 1)
bones/96/rotation = Quaternion(-0.715396, 0.0713076, 0.0634679, 0.692168)
bones/98/rotation = Quaternion(-0.552631, 0.00578579, 0.102834, 0.827037)
bones/98/rotation = Quaternion(-0.598703, 0.00499814, 0.109321, 0.79346)
bones/100/rotation = Quaternion(0.808854, 0.0303333, -0.0651724, 0.583599)
bones/102/rotation = Quaternion(-0.544762, 0.00992924, 0.107889, 0.831562)
bones/102/rotation = Quaternion(-0.59128, 0.00909082, 0.114231, 0.798284)
bones/102/scale = Vector3(1, 1, 1)
bones/104/rotation = Quaternion(0.803479, 0.0249214, -0.0691385, 0.590779)
bones/106/rotation = Quaternion(-0.631915, -0.00360502, 0.102775, 0.768185)
bones/106/rotation = Quaternion(-0.678808, -0.00411817, 0.109739, 0.726058)
bones/106/scale = Vector3(1, 1, 1)
bones/108/scale = Vector3(1, 1, 1)
bones/110/rotation = Quaternion(0.346017, 0.0755612, -0.0156624, 0.935049)
bones/112/rotation = Quaternion(0.0147807, 0.935854, 0.351872, -0.0120522)
bones/112/rotation = Quaternion(0.0150671, 0.942013, 0.335018, -0.0121359)
bones/112/scale = Vector3(1, 1, 1)
bones/114/rotation = Quaternion(0.015884, 0.718179, -0.69565, 0.00621692)
bones/114/scale = Vector3(1, 1, 1)
@ -1434,67 +1434,67 @@ bones/126/rotation = Quaternion(0.993232, 0.00676712, -0.0811637, -0.0828125)
bones/126/scale = Vector3(1, 1, 0.999988)
[node name="Plane_009_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="0"]
transform = Transform3D(1, 0.000205845, 8.38265e-05, -0.000206143, 0.999994, 0.00379899, -8.30814e-05, -0.0037989, 0.999993, -0.000749588, -0.0110144, 0.00422662)
transform = Transform3D(0.999992, 0.000212088, 0.00411365, -0.000399038, 0.998965, 0.0455033, -0.00409974, -0.0455047, 0.998956, -0.0143216, -0.0209411, 0.057822)
[node name="Plane_012_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="1"]
transform = Transform3D(1, 0.000293493, 9.52333e-05, -0.000293866, 0.999993, 0.00380564, -9.41753e-05, -0.0038054, 0.999993, -0.000845671, -0.0108269, 0.00425225)
transform = Transform3D(0.999989, 0.00100459, 0.004495, -0.0012096, 0.998948, 0.0458429, -0.00444423, -0.0458479, 0.998938, -0.0154314, -0.0195971, 0.0576622)
[node name="Cube_016_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="2"]
transform = Transform3D(1, 0.000125024, 6.50883e-05, -0.00012509, 1, 0.00106882, -6.49989e-05, -0.00106861, 0.999999, -0.000653744, -0.00901096, 0.00142744)
transform = Transform3D(0.999998, -0.000593495, 0.00191472, 0.000593495, 1, 1.36048e-05, -0.00191475, -1.25617e-05, 0.999998, -0.011692, 0.0127543, 0.00379598)
[node name="Plane_004_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="3"]
transform = Transform3D(0.999999, 0.000776455, -0.00065355, -0.000774369, 0.999994, 0.00334124, 0.000656113, -0.00334059, 0.999994, 0.000239849, -0.0086863, -0.000900626)
transform = Transform3D(0.999993, -0.00169116, 0.00308003, 0.00151005, 0.998323, 0.0578669, -0.0031727, -0.057862, 0.99832, -0.0117967, -0.0558776, 0.019339)
[node name="Cube_013_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="4"]
transform = Transform3D(1, 0.000126548, 0.000158653, -0.000126928, 0.999997, 0.00245646, -0.000158392, -0.00245622, 0.999997, -0.000688553, -0.00954098, 0.00143909)
transform = Transform3D(0.999995, -0.000562638, 0.00310816, 0.000525132, 0.999928, 0.0120666, -0.00311474, -0.0120649, 0.999922, -0.0121355, 0.00831187, 0.00515246)
[node name="Plane_011_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="5"]
transform = Transform3D(1, -1.53482e-06, -0.000114728, 2.20537e-06, 0.999982, 0.00602791, 0.000114648, -0.00602774, 0.999982, 0.000809193, -0.0355403, 2.00272e-05)
transform = Transform3D(0.999998, -0.0018505, -0.000770778, 0.00190312, 0.997191, 0.0748818, 0.000630029, -0.074883, 0.997192, 0.00745058, -0.447659, -0.0120988)
[node name="Plane_002_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="6"]
transform = Transform3D(1, 0.000224903, 0.000170846, -0.000225618, 0.999992, 0.00406602, -0.000169963, -0.00406593, 0.999992, -0.000922441, -0.00990629, 0.00588202)
transform = Transform3D(0.999994, 0.00112568, 0.0033417, -0.00127017, 0.999051, 0.0435573, -0.00328945, -0.0435612, 0.999045, -0.0152912, -0.00381947, 0.0920873)
[node name="Plane_013_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="7"]
transform = Transform3D(1, 0.000224903, 0.000170846, -0.000225618, 0.999992, 0.00406602, -0.000169963, -0.00406593, 0.999992, -0.000922441, -0.00990629, 0.00588202)
transform = Transform3D(0.999994, 0.00112568, 0.0033417, -0.00127017, 0.999051, 0.0435573, -0.00328945, -0.0435612, 0.999045, -0.0152912, -0.00381947, 0.0920873)
[node name="Cube_007_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="8"]
transform = Transform3D(1, 0.000120282, 0.000139087, -0.000120908, 0.999989, 0.00457582, -0.000138573, -0.00457564, 0.999989, -0.000667572, -0.0121295, 0.00176287)
transform = Transform3D(0.999996, -0.000944234, 0.00278151, 0.000786632, 0.998423, 0.0561441, -0.00283008, -0.0561417, 0.998419, -0.0115902, -0.0499364, 0.0197642)
[node name="Plane_015_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="9"]
transform = Transform3D(1, 7.66739e-05, 0.000252143, -7.60555e-05, 0.999997, -0.00252292, -0.000252359, 0.00252295, 0.999997, -0.000883341, 0.00325054, -0.00315332)
transform = Transform3D(0.999992, -0.000180684, 0.00397385, 0.000488974, 0.996976, -0.0777095, -0.00394778, 0.0777108, 0.996968, -0.0147536, 0.244844, -0.0727139)
[node name="Cube_010_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="10"]
transform = Transform3D(1, 4.00338e-05, -5.93272e-05, -3.97265e-05, 0.999986, 0.00541397, 5.94926e-05, -0.00541396, 0.999985, 0.000362158, -0.0330934, -0.0090704)
transform = Transform3D(1, -0.000165071, -0.00101964, 0.000241917, 0.997121, 0.075824, 0.00100419, -0.075824, 0.997121, 0.00654006, -0.454019, -0.180427)
[node name="Cube_012_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="11"]
transform = Transform3D(1, 1.26146e-05, -6.39997e-05, -1.2408e-05, 0.999994, 0.00354904, 6.39959e-05, -0.00354895, 0.999994, 0.000402451, -0.0228404, -0.0100021)
transform = Transform3D(1, -0.000417421, -0.000725111, 0.000444777, 0.999273, 0.0381292, 0.000708672, -0.0381295, 0.999273, 0.00502491, -0.246607, -0.208979)
[node name="Cylinder_002_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="12"]
transform = Transform3D(1, -1.77636e-15, 0, -1.77636e-15, 1, -4.37113e-08, 0, 4.37113e-08, 1, 0, 0, -0.0128064)
transform = Transform3D(1, -1.77636e-15, 0, -1.77636e-15, 1, -4.37113e-08, 0, 4.37113e-08, 1, 0, 0, -0.243319)
[node name="Cube_006_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="13"]
transform = Transform3D(1, 7.18899e-10, -2.01781e-08, -7.60139e-10, 1, -1.49128e-07, 2.01603e-08, 1.78756e-07, 1, -1.19209e-07, -1.43051e-06, -0.0128069)
transform = Transform3D(1, 7.18899e-10, -2.01781e-08, -7.60139e-10, 1, -1.49128e-07, 2.01603e-08, 1.78756e-07, 1, -1.19209e-07, -1.43051e-06, -0.24332)
[node name="Cube_017_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="14"]
transform = Transform3D(1, 3.15225e-10, 2.16325e-08, -3.11474e-10, 1, -1.19326e-07, -2.16737e-08, 1.78814e-07, 1, 1.19209e-07, -1.90735e-06, -0.0128088)
transform = Transform3D(1, 3.15225e-10, 2.16325e-08, -3.11474e-10, 1, -1.19326e-07, -2.16737e-08, 1.78814e-07, 1, 1.19209e-07, -1.90735e-06, -0.24332)
[node name="Cube_005_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="15"]
transform = Transform3D(1, -1.7053e-13, -3.41061e-13, 2.84217e-13, 1, -9.23872e-07, 3.41061e-13, 9.23872e-07, 1, -9.09153e-13, 4.52995e-06, -0.0128088)
transform = Transform3D(1, -1.7053e-13, -3.41061e-13, 2.84217e-13, 1, -9.23872e-07, 3.41061e-13, 9.23872e-07, 1, -9.09153e-13, 4.52995e-06, -0.24332)
[node name="Cube_005_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D/Cube_005_Material_0" index="0"]
surface_material_override/0 = ExtResource("8_dt6e4")
[node name="Cube_005_Inside_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="16"]
transform = Transform3D(1, -1.7053e-13, -3.41061e-13, 2.84217e-13, 1, -9.23872e-07, 3.41061e-13, 9.23872e-07, 1, -9.09153e-13, 4.52995e-06, -0.0128088)
transform = Transform3D(1, -1.7053e-13, -3.41061e-13, 2.84217e-13, 1, -9.23872e-07, 3.41061e-13, 9.23872e-07, 1, -9.09153e-13, 4.52995e-06, -0.24332)
[node name="Plane_003_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="17"]
transform = Transform3D(1, 1.08827e-10, -1.00637e-08, -1.10077e-10, 1, -2.82656e-07, 1.00761e-08, 2.82598e-07, 1, -2.38419e-07, 0, -0.0128059)
transform = Transform3D(1, 1.08827e-10, -1.00637e-08, -1.10077e-10, 1, -2.82656e-07, 1.00761e-08, 2.82598e-07, 1, -2.38419e-07, 0, -0.243319)
[node name="Plane_016_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="18"]
transform = Transform3D(1, -1.08827e-10, 1.00637e-08, 1.10077e-10, 1, -2.82656e-07, -1.00761e-08, 2.82598e-07, 1, 2.38419e-07, 0, -0.0128059)
transform = Transform3D(1, -1.08827e-10, 1.00637e-08, 1.10077e-10, 1, -2.82656e-07, -1.00761e-08, 2.82598e-07, 1, 2.38419e-07, 0, -0.243319)
[node name="Cube_008_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="19"]
transform = Transform3D(1, -2.64698e-23, 9.95068e-31, 2.64698e-23, 1, 0, -9.95068e-31, 0, 1, -1.90621e-29, 0, -0.0128064)
transform = Transform3D(1, -2.64698e-23, 9.95068e-31, 2.64698e-23, 1, 0, -9.95068e-31, 0, 1, -1.90621e-29, 0, -0.243319)
[node name="Blackout" type="Node3D" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D/Cube_008_Material_0" index="1"]
visible = false
@ -1541,43 +1541,43 @@ mesh = SubResource("PlaneMesh_fbdqo")
skeleton = NodePath("../..")
[node name="Cube_008_Inside_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="20"]
transform = Transform3D(1, -2.64698e-23, 9.95068e-31, 2.64698e-23, 1, 0, -9.95068e-31, 0, 1, -1.90621e-29, 0, -0.0128064)
transform = Transform3D(1, -2.64698e-23, 9.95068e-31, 2.64698e-23, 1, 0, -9.95068e-31, 0, 1, -1.90621e-29, 0, -0.243319)
[node name="Plane_006_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="21"]
transform = Transform3D(1, -0.000206336, -8.34018e-05, 0.000206679, 0.999994, 0.00379935, 8.26865e-05, -0.00379923, 0.999993, 0.00075078, -0.0110114, 0.00422478)
transform = Transform3D(0.999992, -0.000243187, -0.00393772, 0.000421882, 0.998967, 0.0454597, 0.00392263, -0.0454612, 0.998959, 0.0142083, -0.0208257, 0.0571546)
[node name="Plane_008_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="22"]
transform = Transform3D(1, -0.000293612, -9.54345e-05, 0.00029403, 0.999994, 0.00380501, 9.43393e-05, -0.00380492, 0.999993, 0.000847101, -0.0108256, 0.00425142)
transform = Transform3D(0.99999, -0.00100473, -0.00449514, 0.00120972, 0.998949, 0.0458429, 0.00444442, -0.0458479, 0.998939, 0.0154326, -0.0195967, 0.0576625)
[node name="Cube_004_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="23"]
transform = Transform3D(1, -0.000124998, -6.51479e-05, 0.000125099, 1, 0.00106829, 6.50436e-05, -0.0010682, 1, 0.000653505, -0.00900987, 0.00142667)
transform = Transform3D(0.999998, 0.000593346, -0.00191483, -0.000593329, 1, 1.35452e-05, 0.0019149, -1.24723e-05, 0.999999, 0.0116918, 0.012755, 0.00379652)
[node name="Plane_005_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="24"]
transform = Transform3D(1, -0.000776395, 0.000653952, 0.000774994, 0.999995, 0.00334043, -0.000656962, -0.00334006, 0.999994, -0.000235081, -0.00868416, -0.00090158)
transform = Transform3D(0.999994, 0.00169057, -0.0030785, -0.00150916, 0.998324, 0.0578669, 0.00317086, -0.0578623, 0.99832, 0.0118003, -0.0558759, 0.0193362)
[node name="Cube_003_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="25"]
transform = Transform3D(1, -0.000126518, -0.00015872, 0.000126936, 0.999997, 0.00245595, 0.000158459, -0.00245583, 0.999997, 0.000688553, -0.00953966, 0.00143838)
transform = Transform3D(0.999995, 0.00056266, -0.00310814, -0.000525124, 0.999927, 0.0120666, 0.00311473, -0.0120649, 0.999922, 0.0121348, 0.00831246, 0.00515246)
[node name="Plane_007_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="26"]
transform = Transform3D(1, 1.50502e-06, 0.00011439, -2.23517e-06, 0.999982, 0.00602781, -0.000114321, -0.00602775, 0.999982, -0.000806332, -0.0355401, 2.0504e-05)
transform = Transform3D(0.999998, 0.00185053, 0.00077059, -0.00190301, 0.997191, 0.0748818, -0.000629876, -0.0748831, 0.997192, -0.0074482, -0.447659, -0.0120983)
[node name="Plane_014_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="27"]
transform = Transform3D(1, -0.000225231, -0.000171013, 0.000225931, 0.999992, 0.00406599, 0.000170123, -0.00406596, 0.999992, 0.000923872, -0.00990534, 0.00588298)
transform = Transform3D(0.999994, -0.00112587, -0.00334179, 0.00127038, 0.99905, 0.0435568, 0.00328954, -0.0435607, 0.999045, 0.0152922, -0.00381756, 0.0920875)
[node name="Plane_010_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="28"]
transform = Transform3D(1, -0.000271454, -0.000180814, 0.000272214, 0.999992, 0.00408477, 0.000179756, -0.00408471, 0.999992, 0.00100517, -0.00994503, 0.00584769)
transform = Transform3D(0.999992, -0.00193824, -0.00356965, 0.00209311, 0.999034, 0.0439021, 0.00348112, -0.0439093, 0.99903, 0.0168588, -0.00387859, 0.0909228)
[node name="Cube_014_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="29"]
transform = Transform3D(1, -0.000120506, -0.000139587, 0.000121139, 0.999989, 0.00457841, 0.000139065, -0.00457835, 0.999989, 0.000668526, -0.0121341, 0.0017662)
transform = Transform3D(0.999996, 0.0009441, -0.00278173, -0.000786409, 0.998422, 0.0561447, 0.00283035, -0.0561422, 0.998419, 0.011591, -0.0499364, 0.0197651)
[node name="Plane_001_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="30"]
transform = Transform3D(1, -7.66814e-05, -0.000251986, 7.6063e-05, 0.999997, -0.00252306, 0.000252217, 0.00252312, 0.999997, 0.000883102, 0.00325114, -0.00315332)
transform = Transform3D(0.999992, 0.000180654, -0.0039737, -0.0004889, 0.996976, -0.0777096, 0.00394764, 0.077711, 0.996968, 0.0147536, 0.244845, -0.0727139)
[node name="Cube_015_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="31"]
transform = Transform3D(1, -4.03021e-05, 5.89701e-05, 3.9991e-05, 0.999986, 0.00541398, -5.91428e-05, -0.00541396, 0.999985, -0.000360012, -0.0330926, -0.00906944)
transform = Transform3D(1, 0.000164827, 0.00101945, -0.00024163, 0.997121, 0.0758239, -0.001004, -0.075824, 0.997121, -0.00653887, -0.454017, -0.180427)
[node name="Cube_001_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="32"]
transform = Transform3D(1, -1.2624e-05, 6.40183e-05, 1.24168e-05, 0.999994, 0.00354904, -6.40152e-05, -0.00354895, 0.999994, -0.000402927, -0.02284, -0.0100026)
transform = Transform3D(1, 0.000417389, 0.000725149, -0.000444711, 0.999273, 0.0381292, -0.000708692, -0.0381294, 0.999273, -0.00502539, -0.246606, -0.20898)
[node name="Cylinder_001_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="33"]
transform = Transform3D(1, 1.77636e-15, 0, 1.77636e-15, 1, -4.37113e-08, 0, 4.37113e-08, 1, 0, 0, -0.0128064)
transform = Transform3D(1, 1.77636e-15, 0, 1.77636e-15, 1, -4.37113e-08, 0, 4.37113e-08, 1, 0, 0, -0.243319)

View File

@ -0,0 +1,98 @@
[gd_scene load_steps=10 format=3 uid="uid://bsnw37bqf5hgr"]
[ext_resource type="Shader" path="res://src/shaders/outline.gdshader" id="1_4j0xd"]
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_81ofd"]
particle_flag_align_y = true
direction = Vector3(0, 0, -1)
spread = 30.0
initial_velocity_min = 10.0
initial_velocity_max = 20.0
gravity = Vector3(0, -1, 0)
[sub_resource type="Curve" id="Curve_sr0ug"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="ShaderMaterial" id="ShaderMaterial_pscwi"]
render_priority = 0
shader = ExtResource("1_4j0xd")
shader_parameter/color = null
shader_parameter/width = 1.0
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nu2w1"]
next_pass = SubResource("ShaderMaterial_pscwi")
shading_mode = 0
[sub_resource type="TubeTrailMesh" id="TubeTrailMesh_k2m4l"]
material = SubResource("StandardMaterial3D_nu2w1")
radius = 0.01
sections = 3
section_length = 0.1
curve = SubResource("Curve_sr0ug")
[sub_resource type="Animation" id="Animation_1yygg"]
resource_name = "play"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:emitting")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/1/type = "method"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(1),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"queue_free"
}]
}
[sub_resource type="Animation" id="Animation_wcl8c"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:emitting")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_3glsu"]
_data = {
"RESET": SubResource("Animation_wcl8c"),
"lifetime": SubResource("Animation_1yygg")
}
[node name="BallisticImpact" type="GPUParticles3D"]
emitting = false
amount = 4
lifetime = 0.02
one_shot = true
explosiveness = 1.0
local_coords = true
process_material = SubResource("ParticleProcessMaterial_81ofd")
draw_pass_1 = SubResource("TubeTrailMesh_k2m4l")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_3glsu")
}
autoplay = "lifetime"

View File

@ -33,6 +33,7 @@ albedo_texture = ExtResource("1_a0mii")
emission_enabled = true
emission = Color(1, 1, 1, 1)
emission_energy_multiplier = 16.0
texture_filter = 2
billboard_keep_scale = true
use_particle_trails = true
@ -44,7 +45,6 @@ section_length = 0.5
curve = SubResource("Curve_qsag0")
[node name="SparkShower" type="GPUParticles3D"]
emitting = false
amount = 36
lifetime = 5.0
one_shot = true
@ -54,7 +54,3 @@ trail_enabled = true
trail_lifetime = 0.15
process_material = SubResource("ParticleProcessMaterial_4njd4")
draw_pass_1 = SubResource("RibbonTrailMesh_tcst1")
[node name="GPUParticlesCollisionBox3D" type="GPUParticlesCollisionBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.5, 0)
size = Vector3(10, 1, 10)

View File

@ -0,0 +1,31 @@
[gd_scene load_steps=4 format=3 uid="uid://d2rertco3018a"]
[ext_resource type="Material" uid="uid://dsc0g1qafw80e" path="res://src/maps/arena_map/metal_09.tres" id="1_xlnnn"]
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_5dqn0"]
angle_min = -720.0
angle_max = 720.0
direction = Vector3(-1, 0, -1)
spread = 40.0
initial_velocity_min = 10.0
initial_velocity_max = 15.0
angular_velocity_min = -123.97
orbit_velocity_max = 1.642
collision_mode = 1
collision_friction = 0.0
collision_bounce = 0.27
[sub_resource type="CylinderMesh" id="CylinderMesh_ncrsd"]
material = ExtResource("1_xlnnn")
top_radius = 0.02
bottom_radius = 0.02
height = 0.1
[node name="SpentCasing" type="GPUParticles3D"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0)
emitting = false
amount = 60
amount_ratio = 0.8333
lifetime = 10.0
process_material = SubResource("ParticleProcessMaterial_5dqn0")
draw_pass_1 = SubResource("CylinderMesh_ncrsd")

26
src/equip/autocannon.gd Normal file
View File

@ -0,0 +1,26 @@
extends Weapon
const DAMAGE = 1.0
@onready var animation_player: AnimationPlayer = $AnimationPlayer
@onready var aimcast: RayCast3D = get_tree().get_first_node_in_group("AimCastGroup")
@onready var impact_scene: PackedScene = load("res://src/effects/ballistic_impact.tscn")
func fire() -> void:
if aimcast.is_colliding():
var target: Node3D = aimcast.get_collider()
if target is DamageableBody:
(target as DamageableBody).deal_damage(DAMAGE)
else:
var impact: GPUParticles3D = impact_scene.instantiate()
var point: Vector3 = aimcast.get_collision_point()
var normal: Vector3 = aimcast.get_collision_normal()
target.add_child(impact)
impact.reparent(target)
impact.look_at_from_position(point, normal + point, Vector3(-normal.y, normal.x, 0.0))
func trigger() -> void:
animation_player.play("fire")

157
src/equip/autocannon.tscn Normal file
View File

@ -0,0 +1,157 @@
[gd_scene load_steps=8 format=3 uid="uid://in6j0ylwrk7l"]
[ext_resource type="Material" uid="uid://7a1uvst7oef2" path="res://assets/textures/metal_plate_1k/metal_plate.tres" id="1_8ueic"]
[ext_resource type="Script" path="res://src/equip/autocannon.gd" id="1_bbfmi"]
[ext_resource type="PackedScene" uid="uid://d2rertco3018a" path="res://src/effects/spent_casing.tscn" id="3_tfu5g"]
[sub_resource type="CylinderMesh" id="CylinderMesh_ldwsl"]
material = ExtResource("1_8ueic")
top_radius = 0.2
bottom_radius = 0.2
height = 4.0
[sub_resource type="Animation" id="Animation_udx8y"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MeshInstance3D:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("OmniLight3D:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("OmniLight3D:light_energy")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [16.0]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("SpentCasing:emitting")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_sil41"]
resource_name = "fire"
length = 0.2
step = 0.01
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MeshInstance3D:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.02, 0.2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, 0, -1.2), Vector3(0, 0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("OmniLight3D:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.05),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("OmniLight3D:light_energy")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.05),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [4.0, 0.0]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("SpentCasing:emitting")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 0.2),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}
tracks/4/type = "method"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath(".")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"fire"
}]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_oqhr1"]
_data = {
"RESET": SubResource("Animation_udx8y"),
"fire": SubResource("Animation_sil41")
}
[node name="Autocannon" type="Node3D"]
script = ExtResource("1_bbfmi")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0)
mesh = SubResource("CylinderMesh_ldwsl")
[node name="OmniLight3D" type="OmniLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2.1558)
light_energy = 16.0
light_size = 0.1
light_specular = 0.6
omni_range = 10.0
[node name="SpentCasing" parent="." instance=ExtResource("3_tfu5g")]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, -0.2, 0, -1.4)
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_oqhr1")
}

6
src/equip/weapon.gd Normal file
View File

@ -0,0 +1,6 @@
class_name Weapon
extends Node
func trigger() -> void:
pass # Implemented in derived type

View File

@ -1,9 +1,10 @@
[gd_scene load_steps=22 format=3 uid="uid://drbiyuustse8b"]
[gd_scene load_steps=23 format=3 uid="uid://drbiyuustse8b"]
[ext_resource type="PackedScene" uid="uid://bqp5mwyat3asv" path="res://src/player/player.tscn" id="1_tgee4"]
[ext_resource type="Material" uid="uid://7a1uvst7oef2" path="res://assets/textures/metal_plate_1k/metal_plate.tres" id="2_ewgwm"]
[ext_resource type="PackedScene" uid="uid://2vetjvn3w0si" path="res://src/npc/dummy/dummy.tscn" id="2_stkni"]
[ext_resource type="Shader" path="res://src/shaders/sunny_sky.gdshader" id="2_x74tl"]
[ext_resource type="PackedScene" uid="uid://bsnw37bqf5hgr" path="res://src/effects/ballistic_impact.tscn" id="3_g2cjh"]
[ext_resource type="Material" uid="uid://dsc0g1qafw80e" path="res://src/maps/arena_map/metal_09.tres" id="3_jqqt6"]
[sub_resource type="FastNoiseLite" id="FastNoiseLite_6sfce"]
@ -112,6 +113,9 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
[node name="Dummy" parent="." instance=ExtResource("2_stkni")]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 10)
[node name="BallisticImpact" parent="." instance=ExtResource("3_g2cjh")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.0573, 2.04418, 9.50299)
[node name="Environment" type="Node3D" parent="."]
[node name="WorldEnvironment" type="WorldEnvironment" parent="Environment"]

View File

@ -0,0 +1,14 @@
class_name DamageableBody
extends CharacterBody3D
func deal_damage(delta: float) -> void:
pass # Implemented in derived type
func deal_heat(delta: float) -> void:
pass # Implemented in derived type
func deal_structure(delta: int) -> void:
pass # Implemented in derived type

View File

@ -1,8 +1,27 @@
extends CharacterBody3D
extends DamageableBody
# Get the gravity from the project settings to be synced with RigidBody nodes.
var gravity: float = ProjectSettings.get_setting("physics/3d/default_gravity")
var _damage: float = 0.0
var _heat: float = 0.0
var _structure: int = 5
func deal_damage(delta: float) -> void:
print("yeowch!!")
_damage += delta
func deal_heat(delta: float) -> void:
print("mamma mia that's a spicy meatball!")
_heat += delta
func deal_structure(delta: int) -> void:
print("ack! structured!")
_structure += delta
func _physics_process(delta: float) -> void:
# Add the gravity.

View File

@ -1,4 +1,4 @@
extends CharacterBody3D
extends DamageableBody
const BASE_SPEED: float = 5.0
const BOOST_FORCE: float = 20.0
@ -6,6 +6,9 @@ const JUMP_FORCE: float = 8.0
const INPUT_SENSITIVITY: float = 0.7
const TURN_SENSITIVITY: float = 0.04
var _heat: float = 0.0
var _damage: float = 0.0
@onready var camera_root: ThirdPersonCamera = $CameraRoot
@onready var mesh: Node3D = $Mesh
@onready var animation_tree: AnimationTree = $Mesh/Mech/AnimationTree
@ -13,6 +16,8 @@ const TURN_SENSITIVITY: float = 0.04
@onready var shadow_listener: ShadowListener = $ShadowListener
@onready var spark_shower: GPUParticles3D = $SparkShower
@onready var autocannon: Weapon = %WeaponSlot/Autocannon
@onready var _crosshair: Crosshair = get_tree().get_first_node_in_group("CrosshairGroup")
@onready var _overlay: OverlayEffects = get_tree().get_first_node_in_group("OverlayEffectsGroup")
@onready var _heat_meter: ProgressBar = get_tree().get_first_node_in_group("HeatMeterGroup")
@ -21,22 +26,6 @@ const TURN_SENSITIVITY: float = 0.04
var _structure_meter: StructureMeter = get_tree().get_first_node_in_group("StructureMeterGroup")
# gdlint: disable=class-definitions-order
var _heat: float = 0.0
var heat: float:
set(value):
_heat = clamp(value, 0.0, 100.0)
_heat_meter.value = _heat
get:
return _heat
var _damage: float = 0.0
var damage: float:
set(value):
_damage = clamp(value, 0.0, 100.0)
_damage_meter.value = _damage
get:
return _damage
var structure: int:
set(value):
_structure_meter.structure_count = clamp(
@ -47,6 +36,20 @@ var structure: int:
# gdlint: enable=class-definitions-order
func deal_damage(delta: float) -> void:
_damage = clamp(_damage + delta, 0.0, 100.0)
_damage_meter.value = _damage
func deal_heat(delta: float) -> void:
_heat = clamp(_heat + delta, 0.0, 100.0)
_heat_meter.value = _heat
func deal_structure(delta: int) -> void:
structure += delta
func is_boosting() -> bool:
return animation_tree["parameters/boost/active"]
@ -61,21 +64,24 @@ func _physics_process(delta: float) -> void:
# DEBUG BLOCK {{{
if Input.is_action_just_pressed("ui_left"):
structure -= 1
deal_structure(-1)
if Input.is_action_just_pressed("ui_right"):
structure += 1
deal_structure(1)
if Input.is_action_just_pressed("ui_up"):
heat += 1
damage -= 1
deal_heat(1)
deal_damage(-1)
if Input.is_action_just_pressed("ui_down"):
heat -= 1
damage += 1
deal_heat(-1)
deal_damage(1)
if Input.is_action_just_pressed("ui_cancel"):
shutdown()
if Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
autocannon.trigger()
# DEBUG BLOCK }}}
var effective_gravity: float = GameState.gravity
@ -150,7 +156,7 @@ func _physics_process(delta: float) -> void:
# Take heat if exposed to the sun:
if not shadow_listener.in_shadow():
heat += GameState.SOLAR_HEAT_RATE
deal_heat(GameState.SOLAR_HEAT_RATE)
move_and_slide()

View File

@ -1,8 +1,9 @@
[gd_scene load_steps=10 format=3 uid="uid://bqp5mwyat3asv"]
[gd_scene load_steps=11 format=3 uid="uid://bqp5mwyat3asv"]
[ext_resource type="Script" path="res://src/player/player.gd" id="1_h16ke"]
[ext_resource type="PackedScene" uid="uid://b0ob0t4rhygcx" path="res://src/effects/spark_shower.tscn" id="2_4nuwf"]
[ext_resource type="Script" path="res://src/player/third_person_camera.gd" id="3_gichr"]
[ext_resource type="PackedScene" uid="uid://in6j0ylwrk7l" path="res://src/equip/autocannon.tscn" id="3_viob3"]
[ext_resource type="PackedScene" uid="uid://dd7ebaau8a70n" path="res://assets/models/bipedal_mech/mech.tscn" id="4_s7336"]
[ext_resource type="PackedScene" uid="uid://bg450j3javgoj" path="res://src/util/shadow_listener.tscn" id="4_vf568"]
@ -53,6 +54,142 @@ script = ExtResource("1_h16ke")
[node name="Mech" parent="Mesh" instance=ExtResource("4_s7336")]
transform = Transform3D(0.15, 0, 0, 0, 0.15, 0, 0, 0, 0.15, 0, 0, -0.05)
[node name="Skeleton3D" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5" index="0"]
bones/1/position = Vector3(0, 0, 6.46284)
bones/3/rotation = Quaternion(0.655524, 0.674884, 0.23622, 0.242941)
bones/4/rotation = Quaternion(0.698377, 0.0563606, 0.0722034, 0.709845)
bones/5/rotation = Quaternion(-0.619985, -0.00141936, -0.10116, 0.778064)
bones/6/rotation = Quaternion(-0.435683, 0.0113562, -0.062888, 0.897829)
bones/7/rotation = Quaternion(-0.839955, 0.036693, -0.173648, 0.512812)
bones/11/rotation = Quaternion(-0.836347, 0.0433352, -0.169074, 0.519672)
bones/17/rotation = Quaternion(0.751938, 0.00910013, 0.659083, 0.0107199)
bones/23/rotation = Quaternion(0.901544, 0.00357414, 0.148774, 0.40629)
bones/27/rotation = Quaternion(-0.551487, -0.00579014, -0.102677, 0.82782)
bones/33/rotation = Quaternion(-0.543607, -0.0099368, -0.107733, 0.832338)
bones/35/rotation = Quaternion(-0.63077, 0.00360559, -0.102602, 0.769148)
bones/41/rotation = Quaternion(-0.0147733, 0.935766, 0.352107, 0.0120524)
bones/74/rotation = Quaternion(-0.655524, 0.674884, 0.23622, -0.242941)
bones/75/rotation = Quaternion(0.698377, -0.0563606, -0.0722034, 0.709845)
bones/76/rotation = Quaternion(-0.619985, 0.00141935, 0.10116, 0.778064)
bones/77/rotation = Quaternion(-0.435683, -0.0113562, 0.062888, 0.897829)
bones/78/rotation = Quaternion(-0.839955, -0.036693, 0.173648, 0.512812)
bones/82/rotation = Quaternion(-0.836347, -0.0433352, 0.169074, 0.519672)
bones/88/rotation = Quaternion(0.751938, -0.00910022, -0.659084, 0.0107198)
bones/94/rotation = Quaternion(0.901544, -0.00357412, -0.148774, 0.40629)
bones/98/rotation = Quaternion(-0.551488, 0.00579811, 0.102682, 0.827819)
bones/102/rotation = Quaternion(-0.543608, 0.0099448, 0.107739, 0.832337)
bones/106/rotation = Quaternion(-0.630771, -0.00359684, 0.102609, 0.769147)
bones/112/rotation = Quaternion(0.0147734, 0.935766, 0.352107, -0.0120524)
[node name="Plane_009_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="0"]
transform = Transform3D(1, 0.000203416, -5.02169e-05, -0.000203341, 0.999997, 0.00281864, 5.06267e-05, -0.00281847, 0.999996, -0.000291109, -0.00959593, 0.00090009)
[node name="Plane_012_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="1"]
transform = Transform3D(1, 0.000266612, -3.70592e-05, -0.000266537, 0.999996, 0.00282425, 3.7685e-05, -0.00282407, 0.999996, -0.000364065, -0.00946718, 0.000972688)
[node name="Cube_016_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="2"]
transform = Transform3D(1, 0.000136666, -5.96046e-06, -0.000136739, 1, 0.000836968, 5.93066e-06, -0.000836864, 1, -0.000262022, -0.00816771, -0.000927985)
[node name="Plane_004_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="3"]
transform = Transform3D(0.999995, -0.000587419, -0.00278325, 0.000595286, 0.999996, 0.00284241, 0.00278142, -0.00284413, 0.999992, 0.00373793, -0.0121993, -0.00962865)
[node name="Cube_013_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="4"]
transform = Transform3D(1, 0.000137903, 6.19665e-05, -0.000138089, 0.999999, 0.00185153, -6.18324e-05, -0.00185141, 0.999998, -0.000287294, -0.00855535, -0.000921726)
[node name="Plane_011_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="5"]
transform = Transform3D(1, 3.53903e-05, -8.43122e-05, -3.50922e-05, 0.999992, 0.00396769, 8.43583e-05, -0.00396763, 0.999992, 0.000598192, -0.0236566, -0.00162411)
[node name="Plane_002_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="6"]
transform = Transform3D(1, 0.000220656, 7.01696e-05, -0.000220925, 0.999996, 0.00290576, -6.96331e-05, -0.00290579, 0.999996, -0.000486374, -0.00899434, 0.00175929)
[node name="Plane_013_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="7"]
transform = Transform3D(1, 0.000220656, 7.01696e-05, -0.000220925, 0.999996, 0.00290576, -6.96331e-05, -0.00290579, 0.999996, -0.000486374, -0.00899434, 0.00175929)
[node name="Cube_007_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="8"]
transform = Transform3D(1, 0.000156946, 6.0007e-05, -0.0001572, 0.999995, 0.0031957, -5.95823e-05, -0.0031957, 0.999995, -0.000314951, -0.0102969, -0.000587463)
[node name="Plane_015_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="9"]
transform = Transform3D(1, 7.9304e-05, 0.000139385, -7.92295e-05, 0.999999, -0.000894278, -0.000139542, 0.000894248, 1, -0.000431776, -0.00160009, -0.00337505)
[node name="Cube_010_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="10"]
transform = Transform3D(1, 2.91038e-05, -4.32144e-05, -2.90144e-05, 0.999992, 0.00395888, 4.32134e-05, -0.00395879, 0.999992, 0.000264645, -0.0242016, -0.00664806)
[node name="Cube_012_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="11"]
transform = Transform3D(1, 9.17181e-06, -4.65667e-05, -9.13643e-06, 0.999997, 0.00259498, 4.64714e-05, -0.00259492, 0.999997, 0.000293016, -0.0167026, -0.0073204)
[node name="Cylinder_002_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="12"]
transform = Transform3D(1, -1.77636e-15, 0, -1.77636e-15, 1, -4.37113e-08, 0, 4.37113e-08, 1, 0, 0, -0.00936365)
[node name="Cube_006_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="13"]
transform = Transform3D(1, 7.18899e-10, -2.01781e-08, -7.60139e-10, 1, -1.49128e-07, 2.01603e-08, 1.78756e-07, 1, -1.19209e-07, -1.43051e-06, -0.00936413)
[node name="Cube_017_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="14"]
transform = Transform3D(1, 3.15225e-10, 2.16325e-08, -3.11474e-10, 1, -1.19326e-07, -2.16737e-08, 1.78814e-07, 1, 1.19209e-07, -1.90735e-06, -0.00936604)
[node name="Cube_005_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="15"]
transform = Transform3D(1, -1.7053e-13, -3.41061e-13, 2.84217e-13, 1, -9.23872e-07, 3.41061e-13, 9.23872e-07, 1, -9.09153e-13, 4.52995e-06, -0.00936604)
[node name="WeaponSlot" type="Node3D" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D/Cube_005_Material_0" index="1"]
unique_name_in_owner = true
transform = Transform3D(1, 1.42109e-14, -4.74338e-20, -1.42109e-14, 1, 1.7053e-13, -3.38813e-20, -1.7053e-13, 1, 0, 0, 0)
[node name="Autocannon" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D/Cube_005_Material_0/WeaponSlot" instance=ExtResource("3_viob3")]
transform = Transform3D(1, -7.45389e-20, -2.84217e-14, -2.84217e-14, -4.37115e-08, -1, 1.35525e-20, 1, -4.37115e-08, -1.61931, -4.00469, 7.83282)
[node name="Cube_005_Inside_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="16"]
transform = Transform3D(1, -1.7053e-13, -3.41061e-13, 2.84217e-13, 1, -9.23872e-07, 3.41061e-13, 9.23872e-07, 1, -9.09153e-13, 4.52995e-06, -0.00936604)
[node name="Plane_003_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="17"]
transform = Transform3D(1, 1.08827e-10, -1.00637e-08, -1.10077e-10, 1, -2.82656e-07, 1.00761e-08, 2.82598e-07, 1, -2.38419e-07, 0, -0.00936317)
[node name="Plane_016_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="18"]
transform = Transform3D(1, -1.08827e-10, 1.00637e-08, 1.10077e-10, 1, -2.82656e-07, -1.00761e-08, 2.82598e-07, 1, 2.38419e-07, 0, -0.00936317)
[node name="Cube_008_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="19"]
transform = Transform3D(1, -2.64698e-23, 9.95068e-31, 2.64698e-23, 1, 0, -9.95068e-31, 0, 1, -1.90621e-29, 0, -0.00936365)
[node name="Cube_008_Inside_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="20"]
transform = Transform3D(1, -2.64698e-23, 9.95068e-31, 2.64698e-23, 1, 0, -9.95068e-31, 0, 1, -1.90621e-29, 0, -0.00936365)
[node name="Plane_006_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="21"]
transform = Transform3D(1, -0.000203609, 5.03063e-05, 0.00020352, 0.999997, 0.00281975, -5.06788e-05, -0.00281969, 0.999996, 0.000292063, -0.00959593, 0.000900328)
[node name="Plane_008_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="22"]
transform = Transform3D(1, -0.00026682, 3.7007e-05, 0.000266746, 0.999997, 0.00282437, -3.75658e-05, -0.00282431, 0.999996, 0.000365019, -0.00946718, 0.000972688)
[node name="Cube_004_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="23"]
transform = Transform3D(1, -0.000136722, 6.02007e-06, 0.000136767, 1, 0.000836968, -5.91576e-06, -0.000836909, 1, 0.000261545, -0.00816773, -0.000928253)
[node name="Plane_005_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="24"]
transform = Transform3D(0.999996, 0.000588223, 0.0027829, -0.000595316, 0.999996, 0.00284208, -0.0027815, -0.00284392, 0.999992, -0.00373292, -0.0122004, -0.00962663)
[node name="Cube_003_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="25"]
transform = Transform3D(1, -0.000137947, -6.19218e-05, 0.000138104, 0.999998, 0.00185153, 6.18473e-05, -0.0018515, 0.999998, 0.000286818, -0.00855517, -0.000921726)
[node name="Plane_007_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="26"]
transform = Transform3D(1, -3.54797e-05, 8.40756e-05, 3.51667e-05, 0.999992, 0.00396762, -8.40765e-05, -0.00396764, 0.999992, -0.000595808, -0.023656, -0.00162315)
[node name="Plane_014_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="27"]
transform = Transform3D(1, -0.000208244, -5.61588e-05, 0.000208452, 0.999996, 0.0029082, 5.56782e-05, -0.00290811, 0.999996, 0.000439882, -0.00904286, 0.00171423)
[node name="Plane_010_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="28"]
transform = Transform3D(1, -0.000230372, -6.46785e-05, 0.000230595, 0.999996, 0.00291762, 6.41719e-05, -0.00291768, 0.999996, 0.00048542, -0.00910521, 0.00172591)
[node name="Cube_014_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="29"]
transform = Transform3D(1, -0.000142269, -4.34443e-05, 0.000142448, 0.999995, 0.00319871, 4.31314e-05, -0.00319871, 0.999995, 0.000267744, -0.0103495, -0.000637293)
[node name="Plane_001_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="30"]
transform = Transform3D(1, -7.93561e-05, -0.000139199, 7.92593e-05, 1, -0.000894457, 0.000139423, 0.000894427, 1, 0.000431299, -0.00159973, -0.00337553)
[node name="Cube_015_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="31"]
transform = Transform3D(1, -2.94e-05, 4.29363e-05, 2.92696e-05, 0.999992, 0.00395895, -4.2894e-05, -0.00395879, 0.999992, -0.000262737, -0.0242015, -0.00664663)
[node name="Cube_001_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="32"]
transform = Transform3D(1, -9.22714e-06, 4.66232e-05, 9.14519e-06, 0.999997, 0.00259498, -4.64907e-05, -0.00259492, 0.999997, -0.000293732, -0.0167021, -0.00732088)
[node name="Cylinder_001_Material_0" parent="Mesh/Mech/Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="33"]
transform = Transform3D(1, 1.77636e-15, 0, 1.77636e-15, 1, -4.37113e-08, 0, 4.37113e-08, 1, 0, 0, -0.00936365)
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
shape = SubResource("CapsuleShape3D_otw5j")
@ -61,6 +198,10 @@ shape = SubResource("CapsuleShape3D_otw5j")
transform = Transform3D(1, 0, 0, 0, 0.965926, -0.258819, 0, 0.258819, 0.965926, 0, 2, 0)
script = ExtResource("3_gichr")
[node name="AimCast" type="RayCast3D" parent="CameraRoot" groups=["AimCastGroup"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0, 1)
target_position = Vector3(0, 0, 1000)
[node name="SpringArm3D" type="SpringArm3D" parent="CameraRoot"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0, 0)
spring_length = -1.5
@ -73,6 +214,11 @@ current = true
[node name="SparkShower" parent="." instance=ExtResource("2_4nuwf")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
emitting = false
[node name="GPUParticlesCollisionBox3D" type="GPUParticlesCollisionBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0)
size = Vector3(10, 1, 10)
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
@ -80,3 +226,5 @@ libraries = {
}
[connection signal="stomp" from="Mesh/Mech" to="." method="_on_mech_stomp"]
[editable path="Mesh/Mech"]

View File

@ -23,12 +23,13 @@ float luminance(vec3 color) {
}
void fragment() {
vec3 screen_color = texture(screen_texture, SCREEN_UV).rgb;
vec4 screen_color = texture(screen_texture, SCREEN_UV).rgba;
float Y = luminance(screen_color);
float Y = luminance(screen_color.rgb);
// adjust contrast & offset
Y = clamp((Y - 0.5 + offset) * contrast + 0.5, 0.0, 1.0);
ALBEDO.rgb = Y > threshold ? color_hi : color_low;
ALPHA = screen_color.a;
}