diff --git a/godot/boot.tscn b/godot/boot.tscn index 2d8c11a..70242bf 100644 --- a/godot/boot.tscn +++ b/godot/boot.tscn @@ -9,7 +9,7 @@ [node name="Environment" parent="." instance=ExtResource("2_og5hb")] [node name="Enemy" parent="." instance=ExtResource("3_ppe0x")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.321304, 0.548716, -10.4406) +transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 9.02629, 0.21507, -7.46576) [node name="Enemy2" parent="." instance=ExtResource("3_ppe0x")] transform = Transform3D(0.139795, 0, -0.990181, 0, 1, 0, 0.990181, 0, 0.139795, 8.69408, 0.536154, -15.4052) diff --git a/godot/lighting/section_2.exr b/godot/lighting/section_2.exr index fb0bbe8..788aa5c 100644 Binary files a/godot/lighting/section_2.exr and b/godot/lighting/section_2.exr differ diff --git a/godot/lighting/section_2.lmbake b/godot/lighting/section_2.lmbake index 21a903a..8f6c710 100644 Binary files a/godot/lighting/section_2.lmbake and b/godot/lighting/section_2.lmbake differ diff --git a/godot/models/character.glb b/godot/models/character.glb index b07d806..4d731fc 100644 --- a/godot/models/character.glb +++ b/godot/models/character.glb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7b5f8f5e23c40c452e620f0a99081f59ac2df08365044e27af415ef69738edd4 -size 20446112 +oid sha256:01bc84124adbf72bb6e3a2ad9265d490802f000faa5066448db47f9f8c2f5d0e +size 20452080 diff --git a/godot/objects/artillery_target.tscn b/godot/objects/artillery_target.tscn new file mode 100644 index 0000000..d5b712f --- /dev/null +++ b/godot/objects/artillery_target.tscn @@ -0,0 +1,8 @@ +[gd_scene load_steps=2 format=3 uid="uid://6x5ka3l7b6b7"] + +[ext_resource type="PackedScene" uid="uid://be2yogspyg40p" path="res://particles/explosion.tscn" id="1_q0jpb"] + +[node name="ArtilleryTarget" type="ArtilleryTarget"] +effect = ExtResource("1_q0jpb") +frequency_min = 1.0 +frequency_max = 3.0 diff --git a/godot/objects/enemy.tscn b/godot/objects/enemy.tscn index e25c456..e395dbf 100644 --- a/godot/objects/enemy.tscn +++ b/godot/objects/enemy.tscn @@ -4,6 +4,7 @@ [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_3tduq"] radius = 0.370388 +height = 2.38725 [node name="Enemy" type="Enemy"] collision_layer = 3 @@ -22,7 +23,7 @@ transform = Transform3D(-0.999748, -0.00611106, 0.0216074, 0.0216358, -0.0046190 aim_weapon = true [node name="CollisionShape3D" type="CollisionShape3D" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.19104, 0) shape = SubResource("CapsuleShape3D_3tduq") [editable path="CharacterModel"] diff --git a/godot/objects/player.tscn b/godot/objects/player.tscn index 13ac82d..458df5a 100644 --- a/godot/objects/player.tscn +++ b/godot/objects/player.tscn @@ -16,78 +16,6 @@ floor_snap_length = 0.2 [node name="CharacterModel" parent="." instance=ExtResource("1_cwt7u")] unique_name_in_owner = true -[node name="Skeleton3D" parent="CharacterModel/skeleton_character" index="0"] -bones/0/rotation = Quaternion(1.12928e-22, 1, 2.98023e-08, -1.94707e-07) -bones/1/position = Vector3(3.1225e-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.552644, 0.713849) -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/11/rotation = Quaternion(-0.030518, -0.0130498, -0.0216154, 0.999215) -bones/12/rotation = Quaternion(0.0087248, 0.00565774, 0.0013103, 0.999945) -bones/13/rotation = Quaternion(-0.617934, -0.0462445, 0.180663, 0.763793) -bones/14/rotation = Quaternion(-0.23045, 0.0743406, 0.160693, 0.956841) -bones/15/rotation = Quaternion(-0.541263, -0.00752765, 0.238029, 0.806424) -bones/16/rotation = Quaternion(-0.611024, -0.262913, 0.402215, 0.629087) -bones/17/rotation = Quaternion(0.0158022, 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.0140334, 0.612261) -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/22/rotation = Quaternion(-0.293695, -0.10649, 0.259809, 0.91373) -bones/23/rotation = Quaternion(-0.0310475, -0.0162325, -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/26/rotation = Quaternion(-0.449756, 0.301541, -0.311322, 0.780943) -bones/27/rotation = Quaternion(-0.122233, -0.135947, -0.565028, 0.804562) -bones/28/rotation = Quaternion(0.155388, -0.432411, -0.521703, 0.71882) -bones/29/rotation = Quaternion(-0.0486368, 0.0590466, -0.0759536, 0.994173) -bones/30/rotation = Quaternion(-0.0305179, 0.0130499, 0.0216153, 0.999215) -bones/31/rotation = Quaternion(-0.518356, -0.00412336, -0.00408935, 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/34/rotation = Quaternion(-0.266884, 0.00530696, 0.000658852, 0.963714) -bones/35/rotation = Quaternion(-0.422483, 0.214372, -0.00100308, 0.880654) -bones/36/rotation = Quaternion(-0.345783, -0.0439312, -0.261553, 0.900052) -bones/37/rotation = Quaternion(-0.0107009, 0.0076969, 0.00365465, 0.999906) -bones/38/rotation = Quaternion(-0.389883, 0.108139, -0.120461, 0.906525) -bones/39/rotation = Quaternion(-0.399909, -0.0921328, -0.130163, 0.902575) -bones/40/rotation = Quaternion(-0.0125688, 0.0114118, 0.00134583, 0.999855) -bones/41/rotation = Quaternion(-0.0497163, 0.0839878, -0.166226, 0.981246) -bones/42/rotation = Quaternion(-0.0310475, 0.0162325, 0.00151601, 0.999385) -bones/43/rotation = Quaternion(-0.00109124, -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.55434e-08, 6.24918e-08, 0.707901) -bones/49/position = Vector3(0.0228929, -0.0282939, -0.00824324) -bones/49/rotation = Quaternion(-0.112129, 0.585203, -0.155744, 0.78785) -bones/50/position = Vector3(-0.0246244, 0.246628, -0.0197923) -bones/50/rotation = Quaternion(0.31578, 0.920316, 0.115311, -0.200014) -bones/51/position = Vector3(0.0902225, 0.042579, 0.00142519) -bones/51/rotation = Quaternion(0.997309, -0.00549226, 0.0715033, -0.0152251) -bones/52/rotation = Quaternion(-0.00225666, 0.00306653, -0.000453776, 0.999993) -bones/53/rotation = Quaternion(0.665461, 0.000165138, -0.00238783, 0.746429) -bones/54/position = Vector3(-0.0902225, 0.042579, 0.00142518) -bones/54/rotation = Quaternion(0.997309, 0.00549227, -0.0715033, -0.0152251) -bones/55/rotation = Quaternion(-0.00225666, -0.0030665, 0.000453778, 0.999993) -bones/56/rotation = Quaternion(0.665461, -0.000165001, 0.00238774, 0.746429) -bones/57/position = Vector3(3.64125e-07, 0.0462301, -0.935059) -bones/58/rotation = Quaternion(-2.99921e-13, 0.707107, 0.707107, -2.99921e-13) -bones/59/rotation = Quaternion(2.01446e-13, 0.707107, 0.707107, 2.01446e-13) -bones/60/rotation = Quaternion(-0.707107, 1.25097e-07, 1.25097e-07, 0.707107) -bones/61/rotation = Quaternion(-0.707107, 1.25097e-07, 1.25097e-07, 0.707107) -bones/62/rotation = Quaternion(-0.707107, 1.5189e-07, 1.5189e-07, 0.707107) -bones/63/rotation = Quaternion(-0.707107, 1.5189e-07, 1.5189e-07, 0.707107) - [node name="mesh_helmet_a_001" parent="CharacterModel/skeleton_character/Skeleton3D" index="2"] visible = false @@ -114,7 +42,7 @@ transform = Transform3D(-0.964368, 0.00651711, -0.264483, 0.0126107, 0.999693, - shape = SubResource("SphereShape3D_v7ajo") spring_length = 1.3 -[node name="Camera" type="Camera3D" parent="CameraParent/CameraSpring"] +[node name="Camera" type="CameraEffects" parent="CameraParent/CameraSpring"] transform = Transform3D(0.960689, 0.0368572, -0.27517, 0.00642303, 0.987932, 0.154751, 0.277554, -0.150435, 0.948859, -1.09896e-07, -8.34465e-07, 1.3) fov = 41.9276 far = 100.0 diff --git a/godot/objects/section_2.tscn b/godot/objects/section_2.tscn index cbd0ea0..22bdfbb 100644 --- a/godot/objects/section_2.tscn +++ b/godot/objects/section_2.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=15 format=3 uid="uid://dm3355tbkvx24"] +[gd_scene load_steps=16 format=3 uid="uid://dm3355tbkvx24"] [ext_resource type="Environment" uid="uid://c1vy5rxxddw78" path="res://lighting/foggy_morning.tres" id="1_5ixfb"] [ext_resource type="ArrayOccluder3D" uid="uid://br22mqb65v0hg" path="res://occlusion/boot.occ" id="2_07v50"] @@ -12,12 +12,13 @@ [ext_resource type="PackedScene" uid="uid://dtp0keenxj1v5" path="res://models/props/trenchwall_2m_dirt.glb" id="11_kca0e"] [ext_resource type="PackedScene" uid="uid://dhj8jxrjui8u0" path="res://models/props/trenchwall_5m_dirt.glb" id="12_t2jcw"] [ext_resource type="PackedScene" uid="uid://c24vfe6oekknf" path="res://models/props/walkover.glb" id="13_bq7v3"] +[ext_resource type="PackedScene" uid="uid://6x5ka3l7b6b7" path="res://objects/artillery_target.tscn" id="13_rl1f8"] [sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_ikuna"] [sub_resource type="NavigationMesh" id="NavigationMesh_e0njj"] -vertices = PackedVector3Array(8.61544, 0.535281, -18.2397, 9.36544, 0.535281, -18.2397, 9.36544, 0.535281, -19.4897, 8.36544, 0.785281, -19.4897, 10.1154, 3.03528, -18.2397, 10.3654, 3.03528, -18.7397, 10.3654, 3.03528, -19.2397, 7.61544, 3.03528, -19.2397, 7.61544, 3.03528, -18.4897, 13.6154, 0.285281, 3.76033, 12.3654, 0.535281, 3.01033, 11.8654, 0.535281, 3.26033, 10.3654, 0.785281, 3.76033, 11.6154, 0.785281, 2.76033, 9.86544, 0.285281, 2.51033, 8.86544, 0.535281, 2.51033, 15.6154, 0.535281, 5.26033, 15.6154, 0.535281, 4.01033, 8.61544, 0.785281, -13.7397, 9.61544, 1.28528, -17.2397, 8.61544, 1.28528, -17.2397, 7.86544, 1.28528, -14.9897, 7.86544, 1.03528, -14.2397, 8.36544, 0.785281, -2.23967, 9.36544, 0.285281, 1.76033, 9.51929, 0.285281, -9.93197, 9.57698, 1.03528, -14.3166, 1.36544, 1.53528, -14.9897, 0.365438, 1.28528, -14.4897, 1.11544, 1.03528, -13.9897, 0.115438, 1.03528, -3.23967, -0.384562, 1.03528, -2.73967, 1.11544, 1.28528, -2.23967, -4.13456, 1.78528, -2.98967, -3.88456, 1.53528, -1.98967, -1.38456, 1.03528, -2.11467, 10.3654, 3.03528, 5.01033, 10.6154, 3.03528, 4.51033, 9.86544, 3.03528, 4.76033, 11.8654, 3.03528, 6.76033, 11.8654, 3.03528, 5.76033, 6.61544, 3.03528, 4.26033, 8.36544, 3.03528, 4.01033, 6.36544, 3.03528, -6.98967, 7.61544, 3.03528, 3.01033, 7.61544, 3.03528, -7.23967, -6.13456, 3.28528, -1.48967, -5.63456, 3.03528, -0.989666, -4.88456, 3.03528, -1.23967, -4.88456, 3.28528, -3.73967, -6.13456, 3.03528, -3.73967) -polygons = [PackedInt32Array(1, 0, 2), PackedInt32Array(2, 0, 3), PackedInt32Array(5, 4, 6), PackedInt32Array(6, 4, 8), PackedInt32Array(6, 8, 7), PackedInt32Array(9, 11, 10), PackedInt32Array(11, 12, 13), PackedInt32Array(13, 12, 14), PackedInt32Array(14, 12, 15), PackedInt32Array(9, 17, 16), PackedInt32Array(22, 21, 18), PackedInt32Array(18, 21, 20), PackedInt32Array(18, 20, 19), PackedInt32Array(11, 9, 12), PackedInt32Array(12, 9, 16), PackedInt32Array(19, 26, 18), PackedInt32Array(18, 26, 25), PackedInt32Array(18, 25, 23), PackedInt32Array(23, 25, 24), PackedInt32Array(23, 24, 15), PackedInt32Array(28, 27, 29), PackedInt32Array(29, 27, 22), PackedInt32Array(22, 27, 21), PackedInt32Array(32, 31, 30), PackedInt32Array(24, 14, 15), PackedInt32Array(32, 35, 31), PackedInt32Array(31, 35, 34), PackedInt32Array(31, 34, 33), PackedInt32Array(28, 29, 30), PackedInt32Array(30, 29, 32), PackedInt32Array(38, 37, 36), PackedInt32Array(36, 40, 39), PackedInt32Array(38, 36, 39), PackedInt32Array(42, 38, 41), PackedInt32Array(41, 38, 39), PackedInt32Array(45, 44, 43), PackedInt32Array(43, 44, 41), PackedInt32Array(44, 42, 41), PackedInt32Array(47, 46, 48), PackedInt32Array(48, 46, 50), PackedInt32Array(48, 50, 49)] +vertices = PackedVector3Array(8.61544, 0.535281, -18.2397, 9.36544, 0.535281, -18.2397, 9.36544, 0.535281, -19.4897, 8.36544, 0.785281, -19.4897, 10.1154, 3.03528, -18.2397, 10.3654, 3.03528, -18.7397, 10.3654, 3.03528, -19.2397, 7.61544, 3.03528, -19.2397, 7.61544, 3.03528, -18.4897, 13.6154, 0.285281, 3.76033, 12.3654, 0.535281, 3.01033, 11.8654, 0.535281, 3.26033, 10.3654, 0.785281, 3.76033, 11.6154, 0.785281, 2.76033, 9.86544, 0.285281, 2.51033, 8.86544, 0.535281, 2.51033, 15.6154, 0.535281, 5.26033, 15.6154, 0.535281, 4.01033, 8.61544, 0.785281, -13.7397, 9.61544, 1.28528, -17.2397, 8.61544, 1.28528, -17.2397, 7.86544, 1.28528, -14.9897, 7.86544, 1.03528, -14.2397, 8.36544, 0.785281, -2.23967, 9.36544, 0.285281, 1.76033, 9.53852, 0.535281, -11.3935, 1.36544, 1.53528, -14.9897, 0.365438, 1.28528, -14.4897, 1.11544, 1.03528, -13.9897, 0.115438, 1.03528, -3.23967, -0.384562, 1.03528, -2.73967, 1.11544, 1.28528, -2.23967, -4.13456, 1.78528, -2.98967, -3.88456, 1.53528, -1.98967, -1.38456, 1.03528, -2.11467, 10.3654, 3.03528, 5.01033, 10.6154, 3.03528, 4.51033, 9.86544, 3.03528, 4.76033, 11.8654, 3.03528, 6.76033, 11.8654, 3.03528, 5.76033, 6.61544, 3.03528, 4.26033, 8.36544, 3.03528, 4.01033, 6.36544, 3.03528, -6.98967, 7.61544, 3.03528, 3.01033, 7.61544, 3.03528, -7.23967, -6.13456, 3.28528, -1.48967, -5.63456, 3.03528, -0.989666, -4.88456, 3.03528, -1.23967, -4.88456, 3.28528, -3.73967, -6.13456, 3.03528, -3.73967) +polygons = [PackedInt32Array(1, 0, 2), PackedInt32Array(2, 0, 3), PackedInt32Array(5, 4, 6), PackedInt32Array(6, 4, 8), PackedInt32Array(6, 8, 7), PackedInt32Array(9, 11, 10), PackedInt32Array(11, 12, 13), PackedInt32Array(13, 12, 14), PackedInt32Array(14, 12, 15), PackedInt32Array(9, 17, 16), PackedInt32Array(22, 21, 18), PackedInt32Array(18, 21, 20), PackedInt32Array(18, 20, 19), PackedInt32Array(11, 9, 12), PackedInt32Array(12, 9, 16), PackedInt32Array(15, 23, 24), PackedInt32Array(24, 23, 25), PackedInt32Array(25, 23, 18), PackedInt32Array(25, 18, 19), PackedInt32Array(27, 26, 28), PackedInt32Array(28, 26, 22), PackedInt32Array(22, 26, 21), PackedInt32Array(31, 30, 29), PackedInt32Array(24, 14, 15), PackedInt32Array(31, 34, 30), PackedInt32Array(30, 34, 33), PackedInt32Array(30, 33, 32), PackedInt32Array(27, 28, 29), PackedInt32Array(29, 28, 31), PackedInt32Array(37, 36, 35), PackedInt32Array(35, 39, 38), PackedInt32Array(37, 35, 38), PackedInt32Array(41, 37, 40), PackedInt32Array(40, 37, 38), PackedInt32Array(44, 43, 42), PackedInt32Array(42, 43, 40), PackedInt32Array(43, 41, 40), PackedInt32Array(46, 45, 47), PackedInt32Array(47, 45, 49), PackedInt32Array(47, 49, 48)] sample_partition_type = 1 agent_height = 1.75 agent_radius = 0.25 @@ -55,7 +56,7 @@ directional_shadow_blend_splits = true navigation_mesh = SubResource("NavigationMesh_e0njj") [node name="dirt_ramp2" parent="NavigationRegion3D" instance=ExtResource("3_2vit1")] -transform = Transform3D(-1, 0, 8.74228e-08, -1.9032e-08, 0.976016, -0.2177, -8.5326e-08, -0.2177, -0.976016, 8.92731, -0.455602, -11.143) +transform = Transform3D(-1, 0, 8.74228e-08, -1.9032e-08, 0.976016, -0.2177, -8.5326e-08, -0.2177, -0.976016, 8.97292, -0.455602, -11.143) [node name="trenchwall_2m" parent="NavigationRegion3D" instance=ExtResource("4_hbo2r")] transform = Transform3D(1.31134e-07, 0, 1, 0, 1, 0, -1, 0, 1.31134e-07, -3.61252, 0, -3.0716) @@ -211,7 +212,7 @@ transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 9.2382 transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 8.30548, -2.38419e-07, -10.5172) [node name="trenchfloor16" parent="NavigationRegion3D" instance=ExtResource("8_14rhs")] -transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 9.23828, -2.38419e-07, -10.465) +transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 9.23828, 0.189088, -10.465) [node name="trenchwall_2m29" parent="NavigationRegion3D" instance=ExtResource("4_hbo2r")] transform = Transform3D(1, 0, -1.74845e-07, 0, 1, 0, 1.74845e-07, 0, 1, 9.62828, 0, -8.38144) @@ -220,7 +221,7 @@ transform = Transform3D(1, 0, -1.74845e-07, 0, 1, 0, 1.74845e-07, 0, 1, 9.62828, transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 8.30548, -2.38419e-07, -8.51721) [node name="trenchfloor17" parent="NavigationRegion3D" instance=ExtResource("8_14rhs")] -transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 9.23828, -2.38419e-07, -8.46501) +transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 9.23828, 0.189088, -8.46501) [node name="trenchwall_2m32" parent="NavigationRegion3D" instance=ExtResource("4_hbo2r")] transform = Transform3D(1, 0, -1.74845e-07, 0, 1, 0, 1.74845e-07, 0, 1, 9.62828, 0, -6.38144) @@ -259,16 +260,16 @@ transform = Transform3D(-0.294608, 0, -0.955618, 0, 1, 0, 0.955618, 0, -0.294608 transform = Transform3D(-0.997805, -0.0149854, 0.0645022, -0.0121901, 0.998978, 0.0435134, -0.0650885, 0.0426316, -0.996969, 8.28078, -0.0569355, -6.8019) [node name="trenchfloor18" parent="NavigationRegion3D" instance=ExtResource("8_14rhs")] -transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 9.23828, -2.38419e-07, -6.46502) +transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 9.23828, 0.189088, -6.46502) [node name="trenchfloor19" parent="NavigationRegion3D" instance=ExtResource("8_14rhs")] -transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 9.23828, -2.38419e-07, -4.465) +transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 9.23828, 0.189088, -4.465) [node name="trenchfloor20" parent="NavigationRegion3D" instance=ExtResource("8_14rhs")] -transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 9.23828, -2.38419e-07, -2.465) +transform = Transform3D(-1, -9.5948e-09, 8.68947e-08, -2.69874e-09, 0.996873, 0.0790159, -8.73811e-08, 0.0790159, -0.996873, 9.23828, 0.108246, -2.51264) [node name="trenchfloor21" parent="NavigationRegion3D" instance=ExtResource("8_14rhs")] -transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 9.23828, -2.38419e-07, -0.465003) +transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 9.23828, -2.38419e-07, -0.534533) [node name="trenchfloor22" parent="NavigationRegion3D" instance=ExtResource("8_14rhs")] transform = Transform3D(-0.917185, 0, -0.398461, 0, 1, 0, 0.398461, 0, -0.917185, 9.62699, -0.0401146, 1.20087) @@ -331,7 +332,28 @@ transform = Transform3D(-0.474211, 0, -0.880411, 0, 1, 0, 0.880411, 0, -0.474211 transform = Transform3D(-0.826945, 0.0284296, -0.561564, 0.0343588, 0.99941, 1.04599e-09, 0.561232, -0.0192946, -0.827434, 8.64298, -0.221343, 2.6185) [node name="walkover3" parent="." instance=ExtResource("13_bq7v3")] -transform = Transform3D(0.146791, 0, -0.989167, 0, 1, 0, 0.989167, 0, 0.146791, 6.32769, 0.4036, -14.728) +transform = Transform3D(0.146791, 0, -0.989167, 0, 1, 0, 0.989167, 0, 0.146791, 6.2642, 0.4036, -14.6069) [node name="walkover4" parent="." instance=ExtResource("13_bq7v3")] transform = Transform3D(-0.996345, -0.0854169, 8.7263e-08, -0.0854169, 0.996345, 3.73369e-09, -8.7263e-08, -3.73369e-09, -1, 9.09391, 0.20791, -10.4648) + +[node name="ArtilleryTarget" parent="." instance=ExtResource("13_rl1f8")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.965554, 2.51555, 4.10178) + +[node name="ArtilleryTarget2" parent="." instance=ExtResource("13_rl1f8")] +spread = 3.0 +frequency_min = 3.0 +frequency_max = 5.0 +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.95139, 2.51555, -10.4458) + +[node name="ArtilleryTarget5" parent="." instance=ExtResource("13_rl1f8")] +spread = 2.0 +frequency_min = 3.0 +frequency_max = 5.0 +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.66028, 2.51555, -0.763191) + +[node name="ArtilleryTarget3" parent="." instance=ExtResource("13_rl1f8")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.00799, 2.51555, -22.162) + +[node name="ArtilleryTarget4" parent="." instance=ExtResource("13_rl1f8")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18.9532, 2.51555, -6.60339) diff --git a/godot/occlusion/boot.occ b/godot/occlusion/boot.occ index 9e0ec2a..843f9bb 100644 Binary files a/godot/occlusion/boot.occ and b/godot/occlusion/boot.occ differ diff --git a/godot/particles/explosion.tscn b/godot/particles/explosion.tscn index a980af9..9c94741 100644 --- a/godot/particles/explosion.tscn +++ b/godot/particles/explosion.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=8 format=3 uid="uid://be2yogspyg40p"] +[gd_scene load_steps=9 format=3 uid="uid://be2yogspyg40p"] [ext_resource type="Material" uid="uid://cnpi4nqbif0st" path="res://particles/materials/dirt_splatters.tres" id="1_70hen"] @@ -11,7 +11,7 @@ curve = SubResource("Curve_f77sp") [sub_resource type="Curve" id="Curve_58b4i"] max_value = 3.0 -_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.0803571, 0.990632), 0.0, 0.0, 0, 0, Vector2(1, 2.70316), 0.0, 0.0, 0, 0] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.115242, 1.35758), 0.0, 0.0, 0, 0, Vector2(1, 2.58193), 1.60659, 0.0, 0, 0] point_count = 3 [sub_resource type="CurveTexture" id="CurveTexture_62j87"] @@ -19,14 +19,14 @@ curve = SubResource("Curve_58b4i") [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_2cudr"] particle_flag_align_y = true -particle_flag_rotate_y = true angle_min = 1.07288e-05 angle_max = 720.0 direction = Vector3(0, 0, 1) spread = 2.905 initial_velocity_min = 1.5 initial_velocity_max = 10.0 -scale_max = 1.5 +scale_min = 1.12 +scale_max = 1.12 scale_curve = SubResource("CurveTexture_62j87") scale_over_velocity_min = 1.0 scale_over_velocity_max = 5.0 @@ -36,15 +36,34 @@ alpha_curve = SubResource("CurveTexture_jj8d7") material = ExtResource("1_70hen") size = Vector2(1.5, 1.5) +[sub_resource type="GDScript" id="GDScript_vkhqp"] +script/source = "extends GPUParticles3D + +@export var play_on_ready = true; + +func _ready(): + self.emitting = self.play_on_ready +" + [node name="ExplosionParticles" type="GPUParticles3D"] transform = Transform3D(-1, 0, -8.74228e-08, -8.74228e-08, 4.37114e-08, 1, 0, 1, -4.37114e-08, 0, 0, 0) emitting = false amount = 20 lifetime = 1.5 one_shot = true -explosiveness = 0.99 -fixed_fps = 60 +explosiveness = 1.0 visibility_aabb = AABB(-3, -3, -1, 6, 6, 10) draw_order = 3 process_material = SubResource("ParticleProcessMaterial_2cudr") draw_pass_1 = SubResource("QuadMesh_ccn0f") +script = SubResource("GDScript_vkhqp") + +[node name="CameraEffectSource" type="CameraEffectSource" parent="."] +play_on_ready = true + +[node name="Timer" type="Timer" parent="."] +wait_time = 4.0 +one_shot = true +autostart = true + +[connection signal="timeout" from="Timer" to="." method="queue_free"] diff --git a/godot/particles/materials/dirt_splatters.tres b/godot/particles/materials/dirt_splatters.tres index e59fc26..38ce8c5 100644 --- a/godot/particles/materials/dirt_splatters.tres +++ b/godot/particles/materials/dirt_splatters.tres @@ -5,6 +5,7 @@ [resource] transparency = 1 vertex_color_use_as_albedo = true +albedo_color = Color(1, 1, 1, 0.501961) albedo_texture = ExtResource("1_3l7wc") billboard_mode = 3 billboard_keep_scale = true diff --git a/godot/particles/textures/dirt_splatters.png b/godot/particles/textures/dirt_splatters.png index 2bf462f..d71fa06 100644 --- a/godot/particles/textures/dirt_splatters.png +++ b/godot/particles/textures/dirt_splatters.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84a48be755cfda4d052cdde6eeb44a53ac5e6181723fe338cb9528175349ee8a -size 5020550 +oid sha256:06f6fc48ab95523d62498f7f114ba86955b2bf2fb07cd788646ef06447b11baa +size 5020845 diff --git a/godot/particles/textures/dirt_splatters.png~ b/godot/particles/textures/dirt_splatters.png~ index b3654f6..641392d 100644 Binary files a/godot/particles/textures/dirt_splatters.png~ and b/godot/particles/textures/dirt_splatters.png~ differ diff --git a/models/character.blend b/models/character.blend index 1aeb5c2..b2f37b0 100644 --- a/models/character.blend +++ b/models/character.blend @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:993c505a6521e0f606347ff6a3f7bcdb3b377b150b88c94b6c3738576be36acd -size 3275580 +oid sha256:10c0808b6b14067334591acb88a94dea5bb78493242a2636326675a7efd46ed2 +size 3279660 diff --git a/models/character.blend1 b/models/character.blend1 index 2b4b8d4..718b4db 100644 Binary files a/models/character.blend1 and b/models/character.blend1 differ diff --git a/models/textures/dirt_splatters.kra b/models/textures/dirt_splatters.kra index 978e2bc..fc16678 100644 --- a/models/textures/dirt_splatters.kra +++ b/models/textures/dirt_splatters.kra @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:99076f3132cd657898da06e6dbdfc6e07ab3653a574411b24cc9040c1e9cc4f2 -size 10076876 +oid sha256:9de4f5e7e35e7c6faa7d61e0913b8655edf28f99953e88b3ee315272e26da7ce +size 10078099 diff --git a/models/textures/dirt_splatters.kra~ b/models/textures/dirt_splatters.kra~ index a3be775..f7dc702 100644 Binary files a/models/textures/dirt_splatters.kra~ and b/models/textures/dirt_splatters.kra~ differ diff --git a/src/artillery_target.cpp b/src/artillery_target.cpp new file mode 100644 index 0000000..b190bff --- /dev/null +++ b/src/artillery_target.cpp @@ -0,0 +1,65 @@ +#include "artillery_target.hpp" +#include "utils/godot_macros.hpp" +#include + +void ArtilleryTarget::_bind_methods() { +#define CLASSNAME ArtilleryTarget + GDPROPERTY_HINTED(effect, gd::Variant::OBJECT, gd::PROPERTY_HINT_RESOURCE_TYPE, "PackedScene"); + GDPROPERTY(spread, gd::Variant::FLOAT); + GDPROPERTY(frequency_min, gd::Variant::FLOAT); + GDPROPERTY(frequency_max, gd::Variant::FLOAT); +} + +void ArtilleryTarget::_ready() { + this->timer = memnew(gd::Timer); + this->add_child(this->timer); + this->timer->connect("timeout", callable_mp(this, &ArtilleryTarget::timer_end)); + this->start_timer(); +} + +void ArtilleryTarget::set_effect(gd::Ref scene) { + this->effect = scene; +} + +gd::Ref ArtilleryTarget::get_effect() const { + return this->effect; +} + +void ArtilleryTarget::set_spread(float value) { + this->spread = value; +} + +float ArtilleryTarget::get_spread() const { + return this->spread; +} + +void ArtilleryTarget::set_frequency_min(float value) { + this->frequency_min = value; +} + +float ArtilleryTarget::get_frequency_min() const { + return this->frequency_min; +} + +void ArtilleryTarget::set_frequency_max(float value) { + this->frequency_max = value; +} + +float ArtilleryTarget::get_frequency_max() const { + return this->frequency_max; +} + +void ArtilleryTarget::timer_end() { + this->start_timer(); + gd::Node *instance{this->effect->instantiate()}; + this->add_child(instance); + if(gd::Node3D *inst3d{gd::Object::cast_to(instance)}) { + double const distance{gd::Math::sqrt(gd::UtilityFunctions::randf_range(0.f, 1.f) * this->spread)}; + double const angle{gd::UtilityFunctions::randf_range(0., M_2_PI)}; + inst3d->set_global_position(this->get_global_position() + gd::Vector3{1.f, 0.f, 0.f}.rotated({0.f, 1.f, 0.f}, angle) * distance); + } +} + +void ArtilleryTarget::start_timer() { + this->timer->start(gd::UtilityFunctions::randf_range(this->frequency_min, this->frequency_max)); +} diff --git a/src/artillery_target.hpp b/src/artillery_target.hpp new file mode 100644 index 0000000..e8e9be2 --- /dev/null +++ b/src/artillery_target.hpp @@ -0,0 +1,33 @@ +#ifndef ARTILLERY_TARGET_HPP +#define ARTILLERY_TARGET_HPP + +#include +#include +#include +namespace gd = godot; + +class ArtilleryTarget : public gd::Node3D { + GDCLASS(ArtilleryTarget, gd::Node3D); + static void _bind_methods(); +public: + virtual void _ready() override; + void set_effect(gd::Ref scene); + gd::Ref get_effect() const; + void set_spread(float value); + float get_spread() const; + void set_frequency_min(float value); + float get_frequency_min() const; + void set_frequency_max(float value); + float get_frequency_max() const; +private: + void timer_end(); + void start_timer(); +private: + float spread{5.f}; + float frequency_min{0.5f}; + float frequency_max{2.f}; + gd::Ref effect{}; + gd::Timer *timer{nullptr}; +}; + +#endif // !ARTILLERY_TARGET_HPP diff --git a/src/camera_effect_source.cpp b/src/camera_effect_source.cpp new file mode 100644 index 0000000..69ea723 --- /dev/null +++ b/src/camera_effect_source.cpp @@ -0,0 +1,62 @@ +#include "camera_effect_source.hpp" +#include "utils/godot_macros.hpp" +#include + +void CameraEffectSource::_bind_methods() { +#define CLASSNAME CameraEffectSource + GDFUNCTION(trigger); + GDPROPERTY(play_on_ready, gd::Variant::BOOL); + GDPROPERTY(falloff, gd::Variant::FLOAT); + GDPROPERTY(intensity, gd::Variant::FLOAT); + GDPROPERTY(time, gd::Variant::FLOAT); +} + +void CameraEffectSource::_ready() { + if(this->play_on_ready) + this->trigger(); +} + +void CameraEffectSource::trigger() { + if(CameraEffects *effects{CameraEffectSource::get_camera()}) { + float const falloff_mod{this->falloff_max_distance == 0.f + ? 1.f + : gd::Math::max(0.f, 1.f - effects->get_global_position().distance_to(this->get_global_position()) / this->falloff_max_distance)}; + effects->push_effect(this->time, this->intensity * falloff_mod); + } +} + +void CameraEffectSource::set_play_on_ready(bool play_on_ready) { + this->play_on_ready = play_on_ready; +} + +bool CameraEffectSource::get_play_on_ready() const { + return this->play_on_ready; +} + +void CameraEffectSource::set_falloff(float max_distance) { + this->falloff_max_distance = max_distance; +} + +float CameraEffectSource::get_falloff() const { + return this->falloff_max_distance; +} + +void CameraEffectSource::set_intensity(float intensity) { + this->intensity = intensity; +} + +float CameraEffectSource::get_intensity() const { + return this->intensity; +} + +void CameraEffectSource::set_time(float time) { + this->time = time; +} + +float CameraEffectSource::get_time() const { + return this->time; +} + +CameraEffects *CameraEffectSource::get_camera() { + return gd::Object::cast_to(this->get_viewport()->get_camera_3d()); +} diff --git a/src/camera_effect_source.hpp b/src/camera_effect_source.hpp new file mode 100644 index 0000000..0a5bb26 --- /dev/null +++ b/src/camera_effect_source.hpp @@ -0,0 +1,32 @@ +#ifndef CAMERA_EFFECT_SOURCE_HPP +#define CAMERA_EFFECT_SOURCE_HPP + +#include "camera_effects.hpp" +#include +namespace gd = godot; + +class CameraEffectSource : public gd::Node3D { + GDCLASS(CameraEffectSource, gd::Node3D); + static void _bind_methods(); +public: + virtual void _ready() override; + void trigger(); + + void set_play_on_ready(bool play_on_ready); + bool get_play_on_ready() const; + void set_falloff(float max_distance); //!< set to zero to affect camera regardless of distance + float get_falloff() const; + void set_intensity(float intensity); + float get_intensity() const; + void set_time(float time); + float get_time() const; +private: + CameraEffects *get_camera(); +private: + bool play_on_ready{false}; + float falloff_max_distance{20.f}; + float intensity{1.f}; + double time{0.5f}; +}; + +#endif // !CAMERA_EFFECT_SOURCE_HPP diff --git a/src/camera_effects.cpp b/src/camera_effects.cpp new file mode 100644 index 0000000..6106d25 --- /dev/null +++ b/src/camera_effects.cpp @@ -0,0 +1,40 @@ +#include "camera_effects.hpp" +#include "utils/util_functions.hpp" +#include + +void CameraEffects::_bind_methods() {} + +void CameraEffects::_ready() { + this->home = this->get_position(); + this->target = this->home; +} + +void CameraEffects::_process(double delta [[maybe_unused]]) { + this->home = this->get_position(); + if(utils::time_seconds() > this->end_time) { + intensity = 0.f; + this->set_position(this->home); + } + if(intensity == 0.f) + return; + gd::Vector3 pos{this->get_position()}; + pos = this->target; + this->set_position(this->home + pos); + this->select_target(); +} + +void CameraEffects::push_effect(float time, float intensity) { + if(intensity > this->intensity) { + this->intensity = intensity; + this->end_time = utils::time_seconds() + time; + } +} + +void CameraEffects::select_target() { + float const intensity_mod{this->intensity * 0.01f}; + this->target = { + float(gd::UtilityFunctions::randf_range(0.f, 1.f) * -gd::Math::sign(this->target.x) * intensity_mod), + float(gd::UtilityFunctions::randf_range(-1.f, 1.f) * intensity_mod), + 0.f + }; +} diff --git a/src/camera_effects.hpp b/src/camera_effects.hpp new file mode 100644 index 0000000..1c86790 --- /dev/null +++ b/src/camera_effects.hpp @@ -0,0 +1,23 @@ +#ifndef CAMERA_EFFECTS_HPP +#define CAMERA_EFFECTS_HPP + +#include +#include +namespace gd = godot; + +class CameraEffects : public gd::Camera3D { + GDCLASS(CameraEffects, gd::Camera3D); + static void _bind_methods(); +public: + virtual void _ready() override; + virtual void _process(double delta) override; + void push_effect(float time, float intensity); + void select_target(); +private: + double end_time{0.5f}; + float intensity{1.f}; + gd::Vector3 target{0.f, 0.f, 0.f}; + gd::Vector3 home{0.f, 0.f, 0.f}; +}; + +#endif // !CAMERA_EFFECTS_HPP diff --git a/src/register_types.cpp b/src/register_types.cpp index b3de8d6..c869e28 100644 --- a/src/register_types.cpp +++ b/src/register_types.cpp @@ -9,6 +9,9 @@ #include "player_anim_tree.hpp" #include "enemy.hpp" #include "hitscan_muzzle.hpp" +#include "camera_effects.hpp" +#include "camera_effect_source.hpp" +#include "artillery_target.hpp" using namespace godot; @@ -22,6 +25,9 @@ void initialize_gdextension_types(ModuleInitializationLevel p_level) GDREGISTER_CLASS(PlayerAnimTree); GDREGISTER_CLASS(Enemy); GDREGISTER_CLASS(HitscanMuzzle); + GDREGISTER_RUNTIME_CLASS(CameraEffects); + GDREGISTER_RUNTIME_CLASS(CameraEffectSource); + GDREGISTER_RUNTIME_CLASS(ArtilleryTarget); } extern "C"