Compare commits

19 Commits

Author SHA1 Message Date
Morph01
32f8f2fcde Add Hitmarkers 2024-08-30 18:09:55 +02:00
Morph01
67f7335dba Crosshair really in the center (it was in the top left center of the 40x40 centered rect) 2024-08-30 16:18:16 +02:00
Morph01
791cea356d Fix SubViewport bug when opening the scene FirstPersonPlayer / Zombie (bone collision shape) / Bullet in the editor 2024-08-30 15:49:22 +02:00
Morph01
68d3cec08a simple dynamic crosshair 2024-08-25 18:25:22 +02:00
Morph01
5c6f82c5d7 Random spawn of zombies 2024-08-22 19:40:32 +02:00
Morph01
faf6a9116d Add Dying animation 2024-08-22 17:53:25 +02:00
Morph01
1f52eb2c52 Collision of zombie body parts completed and different damage added depending on the body part hit 2024-08-22 16:15:54 +02:00
Morph01
d88cb9fbff Added zombie spawn animation, red screen and hit stagger when the player is hit. 2024-08-20 16:53:43 +02:00
Morph01
0c667944dd fix attack angle 2024-08-20 16:49:18 +02:00
Morph01
1a14c78ede Zombies with PathFinding Run and Attack ! 2024-08-16 19:17:51 +02:00
Morph01
6160561498 Squashed commit of the following:
commit 4fd60e7874
Author: Morph01 <145839520+Morph01@users.noreply.github.com>
Date:   Fri Aug 16 14:19:29 2024 +0200

    bug animation ???
2024-08-16 14:56:57 +02:00
Morph01
1662691b6e Better Implementation of Timer 2024-08-16 10:36:32 +02:00
Morph01
91d492c2d8 Bullets Colliding and Disappearing 2024-08-15 13:28:16 +02:00
Morph01
b92c5169c4 LaserGun without collisions 2024-08-14 18:46:31 +02:00
ef0bcd0a35 format
All checks were successful
Linux arm64 / Build (push) Successful in 1m2s
2024-08-13 20:21:05 +02:00
841e25a3ac fix import warnings 2024-08-13 20:02:31 +02:00
a43269910d real FPS 2024-08-13 20:00:21 +02:00
083bf2f04d xmake things 2024-08-13 19:59:33 +02:00
436e9a27c5 Revert "add a testing camera fps (switching cameras by pressing t)"
This reverts commit 4707d85150.
2024-08-13 17:40:57 +02:00
42 changed files with 5135 additions and 182 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

View File

@@ -0,0 +1,123 @@
[gd_scene load_steps=4 format=3 uid="uid://d38w4ae3qj0k4"]
[ext_resource type="PackedScene" uid="uid://ciex3x7rhv1bx" path="res://Scenes/Weapons/steampunk_rifle.tscn" id="1_i6keg"]
[sub_resource type="CapsuleMesh" id="CapsuleMesh_ky6st"]
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_qjfxs"]
points = PackedVector3Array(-0.125207, -0.532801, -0.480507, 0.0227831, 0.47607, 0.498884, 0.169713, 0.559144, 0.464172, 0.231051, -0.803591, 0.320455, 0.40741, 0.651043, -0.243523, -0.482789, 0.594843, 0.0822132, -0.362868, -0.682312, 0.289697, 0.469044, -0.654529, -0.0662713, -0.127444, 0.842701, -0.338103, -0.393435, -0.683942, -0.244717, 0.438255, 0.623309, 0.200849, 0.0841477, 0.977454, 0.114795, -0.0682023, -0.976458, -0.12927, 0.20055, -0.563129, -0.451454, -0.185527, 0.595453, -0.453475, -0.273363, 0.592268, 0.407754, -0.00693649, -0.476823, 0.49966, 0.375821, -0.588614, 0.316955, 0.111579, 0.563059, -0.481177, -0.41725, 0.527866, -0.270497, -0.484546, -0.596972, -0.0665097, -0.279747, 0.908561, 0.0533361, -0.250197, -0.880712, 0.205319, 0.263647, -0.902771, -0.127394, 0.293368, 0.871526, -0.157196, 0.373412, -0.526319, -0.328246, 0.499663, 0.476641, -0.00688856, 0.0531056, 0.875001, 0.324703, -0.154543, -0.590854, 0.465879, -0.0972799, -0.782358, -0.398188, -0.387649, -0.498171, 0.31565, -0.30068, -0.587995, -0.388901)
[node name="FirstPersonPlayer" type="FirstPersonPlayer"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("CapsuleMesh_ky6st")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("ConvexPolygonShape3D_qjfxs")
[node name="Head" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.578545, 0)
[node name="Camera" type="Camera3D" parent="Head"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0)
[node name="Steampunk Rifle" parent="Head/Camera" instance=ExtResource("1_i6keg")]
transform = Transform3D(1, 0, 0, 0, 0.998135, -0.0610485, 0, 0.0610485, 0.998135, 0.19, -0.18, -0.55)
[node name="UserInterface" type="Control" parent="."]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 1
[node name="Crosshair" type="Crosshair" parent="UserInterface"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -20.0
offset_top = -20.0
offset_right = 20.0
offset_bottom = 20.0
grow_horizontal = 2
grow_vertical = 2
[node name="Top" type="Line2D" parent="UserInterface/Crosshair"]
points = PackedVector2Array(20, 15, 20, 5)
width = 2.0
[node name="Right" type="Line2D" parent="UserInterface/Crosshair"]
points = PackedVector2Array(25, 20, 35, 20)
width = 2.0
[node name="Bottom" type="Line2D" parent="UserInterface/Crosshair"]
points = PackedVector2Array(20, 25, 20, 35)
width = 2.0
[node name="Left" type="Line2D" parent="UserInterface/Crosshair"]
points = PackedVector2Array(15, 20, 5, 20)
width = 2.0
[node name="HitMarkers" type="HitMarkers" parent="UserInterface"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -20.0
offset_top = -20.0
offset_right = 20.0
offset_bottom = 20.0
grow_horizontal = 2
grow_vertical = 2
[node name="TopRight" type="Line2D" parent="UserInterface/HitMarkers"]
visible = false
points = PackedVector2Array(22.5, 17.5, 35, 5)
width = 2.0
[node name="BottomRight" type="Line2D" parent="UserInterface/HitMarkers"]
visible = false
points = PackedVector2Array(22.5, 22.5, 35, 35)
width = 2.0
[node name="BottomLeft" type="Line2D" parent="UserInterface/HitMarkers"]
visible = false
points = PackedVector2Array(17.5, 22.5, 5, 35)
width = 2.0
[node name="TopLeft" type="Line2D" parent="UserInterface/HitMarkers"]
visible = false
points = PackedVector2Array(17.5, 17.5, 5, 5)
width = 2.0
[node name="TopRightHS" type="Line2D" parent="UserInterface/HitMarkers"]
visible = false
points = PackedVector2Array(22.5, 17.5, 35, 5)
width = 2.0
default_color = Color(1, 0, 0, 1)
[node name="BottomRightHS" type="Line2D" parent="UserInterface/HitMarkers"]
visible = false
points = PackedVector2Array(22.5, 22.5, 35, 35)
width = 2.0
default_color = Color(1, 0, 0, 1)
[node name="BottomLeftHS" type="Line2D" parent="UserInterface/HitMarkers"]
visible = false
points = PackedVector2Array(17.5, 22.5, 5, 35)
width = 2.0
default_color = Color(1, 0, 0, 1)
[node name="TopLeftHS" type="Line2D" parent="UserInterface/HitMarkers"]
visible = false
points = PackedVector2Array(17.5, 17.5, 5, 5)
width = 2.0
default_color = Color(1, 0, 0, 1)

View File

@@ -3256,6 +3256,7 @@ input_1/reset = true
[sub_resource type="AnimationNodeBlend3" id="AnimationNodeBlend3_3c3it"] [sub_resource type="AnimationNodeBlend3" id="AnimationNodeBlend3_3c3it"]
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_dptuf"] [sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_dptuf"]
graph_offset = Vector2(-43.7693, 23.4538)
nodes/Air/node = SubResource("AnimationNodeAnimation_dfvqk") nodes/Air/node = SubResource("AnimationNodeAnimation_dfvqk")
nodes/Air/position = Vector2(420, 340) nodes/Air/position = Vector2(420, 340)
nodes/Idle/node = SubResource("AnimationNodeAnimation_u51wd") nodes/Idle/node = SubResource("AnimationNodeAnimation_u51wd")
@@ -3285,43 +3286,43 @@ bones/0/name = "Hips"
bones/0/parent = -1 bones/0/parent = -1
bones/0/rest = Transform3D(1, -5.00981e-07, 6.47142e-09, 0, 0.0129164, 0.999917, -5.01023e-07, -0.999917, 0.0129164, -7.72729e-06, 1.55432, -104.275) bones/0/rest = Transform3D(1, -5.00981e-07, 6.47142e-09, 0, 0.0129164, 0.999917, -5.01023e-07, -0.999917, 0.0129164, -7.72729e-06, 1.55432, -104.275)
bones/0/enabled = true bones/0/enabled = true
bones/0/position = Vector3(-0.0082125, 1.55874, -104.203) bones/0/position = Vector3(-0.00545547, 1.5608, -104.173)
bones/0/rotation = Quaternion(-0.679657, -0.269033, 0.250402, 0.634813) bones/0/rotation = Quaternion(-0.673975, -0.26086, 0.257429, 0.641436)
bones/0/scale = Vector3(1, 1, 1) bones/0/scale = Vector3(1, 1, 1)
bones/1/name = "Spine" bones/1/name = "Spine"
bones/1/parent = 0 bones/1/parent = 0
bones/1/rest = Transform3D(1, 4.9454e-07, 3.97682e-08, -4.9454e-07, 0.98715, 0.159796, 3.97681e-08, -0.159796, 0.98715, -4.1641e-10, 10.1824, 4.47034e-08) bones/1/rest = Transform3D(1, 4.9454e-07, 3.97682e-08, -4.9454e-07, 0.98715, 0.159796, 3.97681e-08, -0.159796, 0.98715, -4.1641e-10, 10.1824, 4.47034e-08)
bones/1/enabled = true bones/1/enabled = true
bones/1/position = Vector3(-4.1641e-10, 10.1824, 4.47034e-08) bones/1/position = Vector3(-4.1641e-10, 10.1824, 4.47034e-08)
bones/1/rotation = Quaternion(-0.0311147, 0.0410088, -0.00392906, 0.998666) bones/1/rotation = Quaternion(0.0494452, 0.00102938, -0.0281418, 0.99838)
bones/1/scale = Vector3(1, 1, 1) bones/1/scale = Vector3(1, 1, 1)
bones/2/name = "Spine1" bones/2/name = "Spine1"
bones/2/parent = 1 bones/2/parent = 1
bones/2/rest = Transform3D(1, 4.13003e-14, -6.10621e-16, -4.13003e-14, 1, 5.96046e-08, 6.10624e-16, -5.96046e-08, 1, -6.45306e-12, 10.0027, 2.63751e-06) bones/2/rest = Transform3D(1, 4.13003e-14, -6.10621e-16, -4.13003e-14, 1, 5.96046e-08, 6.10624e-16, -5.96046e-08, 1, -6.45306e-12, 10.0027, 2.63751e-06)
bones/2/enabled = true bones/2/enabled = true
bones/2/position = Vector3(-6.45306e-12, 10.0027, 2.63751e-06) bones/2/position = Vector3(-6.45306e-12, 10.0027, 2.63751e-06)
bones/2/rotation = Quaternion(0.098017, 0.0825765, -0.00578447, 0.991736) bones/2/rotation = Quaternion(0.25634, 0.00456356, -0.0680245, 0.964179)
bones/2/scale = Vector3(1, 1, 1) bones/2/scale = Vector3(1, 1, 1)
bones/3/name = "Spine2" bones/3/name = "Spine2"
bones/3/parent = 2 bones/3/parent = 2
bones/3/rest = Transform3D(1, 7.40298e-08, -1.9083e-09, -7.40543e-08, 0.999668, -0.0257692, -2.13163e-14, 0.0257692, 0.999668, -6.39488e-13, 9.32208, -1.54972e-06) bones/3/rest = Transform3D(1, 7.40298e-08, -1.9083e-09, -7.40543e-08, 0.999668, -0.0257692, -2.13163e-14, 0.0257692, 0.999668, -6.39488e-13, 9.32208, -1.54972e-06)
bones/3/enabled = true bones/3/enabled = true
bones/3/position = Vector3(-6.39488e-13, 9.32208, -1.54972e-06) bones/3/position = Vector3(-6.39488e-13, 9.32208, -1.54972e-06)
bones/3/rotation = Quaternion(0.110777, 0.082485, -0.00684914, 0.990393) bones/3/rotation = Quaternion(0.268751, 0.00362875, -0.0681548, 0.960789)
bones/3/scale = Vector3(1, 1, 1) bones/3/scale = Vector3(1, 1, 1)
bones/4/name = "Neck" bones/4/name = "Neck"
bones/4/parent = 3 bones/4/parent = 3
bones/4/rest = Transform3D(1, -1.45661e-13, -1.46549e-14, 1.45661e-13, 1, -1.86265e-08, 1.46549e-14, 1.86265e-08, 1, 4.13195e-10, 16.8654, 4.15668e-13) bones/4/rest = Transform3D(1, -1.45661e-13, -1.46549e-14, 1.45661e-13, 1, -1.86265e-08, 1.46549e-14, 1.86265e-08, 1, 4.13195e-10, 16.8654, 4.15668e-13)
bones/4/enabled = true bones/4/enabled = true
bones/4/position = Vector3(4.13195e-10, 16.8654, 4.15668e-13) bones/4/position = Vector3(4.13195e-10, 16.8654, 4.15668e-13)
bones/4/rotation = Quaternion(-0.0292872, -0.0109266, 0.000614345, 0.999511) bones/4/rotation = Quaternion(0.0150258, 0.0423437, -0.0448451, 0.997983)
bones/4/scale = Vector3(1, 1, 1) bones/4/scale = Vector3(1, 1, 1)
bones/5/name = "Head" bones/5/name = "Head"
bones/5/parent = 4 bones/5/parent = 4
bones/5/rest = Transform3D(1, 7.74936e-14, 5.77316e-15, -7.74936e-14, 1, 4.47035e-08, -5.77316e-15, -4.47035e-08, 1, -1.07566e-07, 9.3419, 2.84104) bones/5/rest = Transform3D(1, 7.74936e-14, 5.77316e-15, -7.74936e-14, 1, 4.47035e-08, -5.77316e-15, -4.47035e-08, 1, -1.07566e-07, 9.3419, 2.84104)
bones/5/enabled = true bones/5/enabled = true
bones/5/position = Vector3(-1.07566e-07, 9.3419, 2.84104) bones/5/position = Vector3(-1.07566e-07, 9.3419, 2.84104)
bones/5/rotation = Quaternion(-0.0640972, 0.177069, 0.0137292, 0.982013) bones/5/rotation = Quaternion(0.00920543, 0.0563305, 0.022933, 0.998106)
bones/5/scale = Vector3(1, 1, 1) bones/5/scale = Vector3(1, 1, 1)
bones/6/name = "HeadTop_End" bones/6/name = "HeadTop_End"
bones/6/parent = 5 bones/6/parent = 5
@@ -3335,42 +3336,42 @@ bones/7/parent = 3
bones/7/rest = Transform3D(-0.205696, -0.977364, 0.0494833, -0.129005, -0.0230424, -0.991376, 0.970076, -0.210305, -0.121346, -4.56997, 11.1959, -0.806634) bones/7/rest = Transform3D(-0.205696, -0.977364, 0.0494833, -0.129005, -0.0230424, -0.991376, 0.970076, -0.210305, -0.121346, -4.56997, 11.1959, -0.806634)
bones/7/enabled = true bones/7/enabled = true
bones/7/position = Vector3(-4.56997, 11.1959, -0.806634) bones/7/position = Vector3(-4.56997, 11.1959, -0.806634)
bones/7/rotation = Quaternion(-0.571447, 0.511011, -0.514334, -0.384418) bones/7/rotation = Quaternion(-0.407796, 0.575185, -0.614273, -0.354307)
bones/7/scale = Vector3(1, 1, 1) bones/7/scale = Vector3(1, 1, 1)
bones/8/name = "RightArm" bones/8/name = "RightArm"
bones/8/parent = 7 bones/8/parent = 7
bones/8/rest = Transform3D(0.978563, 0.205696, 0.0101912, -0.205948, 0.977364, 0.0484225, -2.57045e-07, -0.0494833, 0.998775, -3.57628e-07, 10.8382, -1.46913e-05) bones/8/rest = Transform3D(0.978563, 0.205696, 0.0101912, -0.205948, 0.977364, 0.0484225, -2.57045e-07, -0.0494833, 0.998775, -3.57628e-07, 10.8382, -1.46913e-05)
bones/8/enabled = true bones/8/enabled = true
bones/8/position = Vector3(1.96774e-07, 10.8382, -3.20984e-07) bones/8/position = Vector3(1.96774e-07, 10.8382, -3.20984e-07)
bones/8/rotation = Quaternion(0.488885, 0.0407173, 0.094859, 0.866219) bones/8/rotation = Quaternion(0.203226, 0.203129, -0.0329129, 0.957264)
bones/8/scale = Vector3(1, 1, 1) bones/8/scale = Vector3(1, 1, 1)
bones/9/name = "RightForeArm" bones/9/name = "RightForeArm"
bones/9/parent = 8 bones/9/parent = 8
bones/9/rest = Transform3D(1, -5.8991e-08, -1.67444e-07, 5.8991e-08, 1, -9.42509e-15, 1.67444e-07, -4.52622e-16, 1, -1.01963e-05, 27.8415, -1.44409e-05) bones/9/rest = Transform3D(1, -5.8991e-08, -1.67444e-07, 5.8991e-08, 1, -9.42509e-15, 1.67444e-07, -4.52622e-16, 1, -1.01963e-05, 27.8415, -1.44409e-05)
bones/9/enabled = true bones/9/enabled = true
bones/9/position = Vector3(-1.00907e-05, 27.8415, -3.06037e-05) bones/9/position = Vector3(-1.00907e-05, 27.8415, -3.06037e-05)
bones/9/rotation = Quaternion(0.0521653, 0.0148866, -0.362646, 0.930347) bones/9/rotation = Quaternion(0.016868, -0.0422137, -0.187411, 0.981229)
bones/9/scale = Vector3(1, 1, 1) bones/9/scale = Vector3(1, 1, 1)
bones/10/name = "RightHand" bones/10/name = "RightHand"
bones/10/parent = 9 bones/10/parent = 9
bones/10/rest = Transform3D(1, -1.90228e-09, 1.90222e-09, 1.90228e-09, 1, 1.10216e-13, -1.90222e-09, -1.10212e-13, 1, 1.54253e-05, 28.3288, 1.70057e-05) bones/10/rest = Transform3D(1, -1.90228e-09, 1.90222e-09, 1.90228e-09, 1, 1.10216e-13, -1.90222e-09, -1.10212e-13, 1, 1.54253e-05, 28.3288, 1.70057e-05)
bones/10/enabled = true bones/10/enabled = true
bones/10/position = Vector3(1.5054e-05, 28.3288, 8.42971e-07) bones/10/position = Vector3(1.5054e-05, 28.3288, 8.42971e-07)
bones/10/rotation = Quaternion(0.113226, -0.0584235, -0.102203, 0.98657) bones/10/rotation = Quaternion(-0.29465, 0.0869538, -0.124768, 0.943426)
bones/10/scale = Vector3(1, 1, 1) bones/10/scale = Vector3(1, 1, 1)
bones/11/name = "RightHandThumb1" bones/11/name = "RightHandThumb1"
bones/11/parent = 10 bones/11/parent = 10
bones/11/rest = Transform3D(0.888246, 0.459367, 6.78003e-07, -0.396939, 0.767535, -0.503319, -0.231209, 0.447071, 0.864101, 2.68185, 2.46481, 1.57399) bones/11/rest = Transform3D(0.888246, 0.459367, 6.78003e-07, -0.396939, 0.767535, -0.503319, -0.231209, 0.447071, 0.864101, 2.68185, 2.46481, 1.57399)
bones/11/enabled = true bones/11/enabled = true
bones/11/position = Vector3(2.68185, 2.46481, 1.57397) bones/11/position = Vector3(2.68185, 2.46481, 1.57397)
bones/11/rotation = Quaternion(0.235588, 0.143186, -0.210042, 0.938019) bones/11/rotation = Quaternion(0.2394, 0.160363, -0.215536, 0.933014)
bones/11/scale = Vector3(1, 1, 1) bones/11/scale = Vector3(1, 1, 1)
bones/12/name = "RightHandThumb2" bones/12/name = "RightHandThumb2"
bones/12/parent = 11 bones/12/parent = 11
bones/12/rest = Transform3D(0.999824, -0.0185942, -0.0023841, 0.0186051, 0.999816, 0.00460874, 0.00229796, -0.00465229, 0.999986, 3.93391e-06, 4.18899, 7.30372e-06) bones/12/rest = Transform3D(0.999824, -0.0185942, -0.0023841, 0.0186051, 0.999816, 0.00460874, 0.00229796, -0.00465229, 0.999986, 3.93391e-06, 4.18899, 7.30372e-06)
bones/12/enabled = true bones/12/enabled = true
bones/12/position = Vector3(-4.17233e-06, 4.18898, -1.18934e-05) bones/12/position = Vector3(-4.17233e-06, 4.18898, -1.18934e-05)
bones/12/rotation = Quaternion(-0.0450556, 0.000988488, 0.185764, 0.98156) bones/12/rotation = Quaternion(-0.115742, 0.0900667, 0.192157, 0.970344)
bones/12/scale = Vector3(1, 1, 1) bones/12/scale = Vector3(1, 1, 1)
bones/13/name = "RightHandThumb3" bones/13/name = "RightHandThumb3"
bones/13/parent = 12 bones/13/parent = 12
@@ -3391,20 +3392,20 @@ bones/15/parent = 10
bones/15/rest = Transform3D(1, 0.000328245, -7.43808e-08, -0.000328245, 1, 2.44166e-11, 7.43808e-08, -1.4988e-15, 1, 2.25983, 9.10829, 0.517869) bones/15/rest = Transform3D(1, 0.000328245, -7.43808e-08, -0.000328245, 1, 2.44166e-11, 7.43808e-08, -1.4988e-15, 1, 2.25983, 9.10829, 0.517869)
bones/15/enabled = true bones/15/enabled = true
bones/15/position = Vector3(2.25983, 9.10828, 0.517853) bones/15/position = Vector3(2.25983, 9.10828, 0.517853)
bones/15/rotation = Quaternion(0.0449154, 0.010135, 0.00840327, 0.998904) bones/15/rotation = Quaternion(0.11025, 0.00650945, 0.00551306, 0.993867)
bones/15/scale = Vector3(1, 1, 1) bones/15/scale = Vector3(1, 1, 1)
bones/16/name = "RightHandIndex2" bones/16/name = "RightHandIndex2"
bones/16/parent = 15 bones/16/parent = 15
bones/16/rest = Transform3D(1, -0.000511482, 3.19887e-07, 0.000511482, 1, 1.0708e-05, -3.25364e-07, -1.07078e-05, 1, -7.49751e-08, 3.69999, 1.65342e-05) bones/16/rest = Transform3D(1, -0.000511482, 3.19887e-07, 0.000511482, 1, 1.0708e-05, -3.25364e-07, -1.07078e-05, 1, -7.49751e-08, 3.69999, 1.65342e-05)
bones/16/enabled = true bones/16/enabled = true
bones/16/position = Vector3(1.82747e-07, 3.7, 7.39788e-07) bones/16/position = Vector3(1.82747e-07, 3.7, 7.39788e-07)
bones/16/rotation = Quaternion(0.159377, 0.00056319, 0.00884515, 0.987178) bones/16/rotation = Quaternion(0.165573, 0.0101262, 0.00848687, 0.986109)
bones/16/scale = Vector3(1, 1, 1) bones/16/scale = Vector3(1, 1, 1)
bones/17/name = "RightHandIndex3" bones/17/name = "RightHandIndex3"
bones/17/parent = 16 bones/17/parent = 16
bones/17/rest = Transform3D(1, 0.000176155, -3.22259e-07, -0.000176155, 1, -1.62121e-05, 3.19404e-07, 1.62121e-05, 1, -2.01722e-07, 2.85001, 9.19147e-07) bones/17/rest = Transform3D(1, 0.000176155, -3.22259e-07, -0.000176155, 1, -1.62121e-05, 3.19404e-07, 1.62121e-05, 1, -2.01722e-07, 2.85001, 9.19147e-07)
bones/17/enabled = true bones/17/enabled = true
bones/17/position = Vector3(-2.01722e-07, 2.85001, 9.19147e-07) bones/17/position = Vector3(-1.84845e-06, 2.85003, 1.18279e-05)
bones/17/rotation = Quaternion(8.10606e-06, -1.60416e-07, -8.80775e-05, 1) bones/17/rotation = Quaternion(8.10606e-06, -1.60416e-07, -8.80775e-05, 1)
bones/17/scale = Vector3(1, 1, 1) bones/17/scale = Vector3(1, 1, 1)
bones/18/name = "RightHandIndex4" bones/18/name = "RightHandIndex4"
@@ -3419,20 +3420,20 @@ bones/19/parent = 10
bones/19/rest = Transform3D(1, 0.0010033, 8.39909e-08, -0.0010033, 1, 6.61679e-11, -8.39908e-08, -1.50436e-10, 1, -2.58012e-05, 9.53251, 4.75128e-05) bones/19/rest = Transform3D(1, 0.0010033, 8.39909e-08, -0.0010033, 1, 6.61679e-11, -8.39908e-08, -1.50436e-10, 1, -2.58012e-05, 9.53251, 4.75128e-05)
bones/19/enabled = true bones/19/enabled = true
bones/19/position = Vector3(-2.61725e-05, 9.5325, 3.135e-05) bones/19/position = Vector3(-2.61725e-05, 9.5325, 3.135e-05)
bones/19/rotation = Quaternion(0.110961, 0.00854111, 0.0243191, 0.99349) bones/19/rotation = Quaternion(0.1721, 0.00873778, 0.0157109, 0.984915)
bones/19/scale = Vector3(1, 1, 1) bones/19/scale = Vector3(1, 1, 1)
bones/20/name = "RightHandMiddle2" bones/20/name = "RightHandMiddle2"
bones/20/parent = 19 bones/20/parent = 19
bones/20/rest = Transform3D(0.999998, -0.00169976, 6.79326e-08, 0.00169976, 0.999998, 5.1725e-06, -7.67245e-08, -5.17238e-06, 1, 4.37467e-07, 3.70001, 1.65339e-05) bones/20/rest = Transform3D(0.999998, -0.00169976, 6.79326e-08, 0.00169976, 0.999998, 5.1725e-06, -7.67245e-08, -5.17238e-06, 1, 4.37467e-07, 3.70001, 1.65339e-05)
bones/20/enabled = true bones/20/enabled = true
bones/20/position = Vector3(5.8697e-08, 3.70001, -3.01458e-05) bones/20/position = Vector3(5.8697e-08, 3.70001, -3.01458e-05)
bones/20/rotation = Quaternion(0.286302, 0.00178444, -0.0180502, 0.957968) bones/20/rotation = Quaternion(0.29122, 0.00291729, -0.0159203, 0.956519)
bones/20/scale = Vector3(1, 1, 1) bones/20/scale = Vector3(1, 1, 1)
bones/21/name = "RightHandMiddle3" bones/21/name = "RightHandMiddle3"
bones/21/parent = 20 bones/21/parent = 20
bones/21/rest = Transform3D(1, 0.000643915, -3.04038e-07, -0.000643915, 1, -5.1723e-06, 3.00708e-07, 5.17249e-06, 1, -4.16598e-07, 2.95, -4.22492e-06) bones/21/rest = Transform3D(1, 0.000643915, -3.04038e-07, -0.000643915, 1, -5.1723e-06, 3.00708e-07, 5.17249e-06, 1, -4.16598e-07, 2.95, -4.22492e-06)
bones/21/enabled = true bones/21/enabled = true
bones/21/position = Vector3(-4.16598e-07, 2.95, -4.22492e-06) bones/21/position = Vector3(1.20966e-05, 2.94998, -3.22118e-06)
bones/21/rotation = Quaternion(2.5862e-06, -1.51187e-07, -0.000321958, 1) bones/21/rotation = Quaternion(2.5862e-06, -1.51187e-07, -0.000321958, 1)
bones/21/scale = Vector3(1, 1, 1) bones/21/scale = Vector3(1, 1, 1)
bones/22/name = "RightHandMiddle4" bones/22/name = "RightHandMiddle4"
@@ -3447,20 +3448,20 @@ bones/23/parent = 10
bones/23/rest = Transform3D(1, -0.000311951, 2.28835e-07, 0.000311951, 1, 7.13874e-11, -2.28835e-07, -1.97758e-15, 1, -1.86514, 9.1036, 0.0430626) bones/23/rest = Transform3D(1, -0.000311951, 2.28835e-07, 0.000311951, 1, 7.13874e-11, -2.28835e-07, -1.97758e-15, 1, -1.86514, 9.1036, 0.0430626)
bones/23/enabled = true bones/23/enabled = true
bones/23/position = Vector3(-1.86514, 9.1036, 0.0430626) bones/23/position = Vector3(-1.86514, 9.1036, 0.0430626)
bones/23/rotation = Quaternion(0.198328, -0.00758743, 0.0667353, 0.977832) bones/23/rotation = Quaternion(0.230492, 0.00939941, 0.0756768, 0.970082)
bones/23/scale = Vector3(1, 1, 1) bones/23/scale = Vector3(1, 1, 1)
bones/24/name = "RightHandRing2" bones/24/name = "RightHandRing2"
bones/24/parent = 23 bones/24/parent = 23
bones/24/rest = Transform3D(1, 0.000442856, 1.18525e-07, -0.000442856, 1, 5.28028e-06, -1.16186e-07, -5.28033e-06, 1, -2.23002e-07, 3.37928, 6.29645e-07) bones/24/rest = Transform3D(1, 0.000442856, 1.18525e-07, -0.000442856, 1, 5.28028e-06, -1.16186e-07, -5.28033e-06, 1, -2.23002e-07, 3.37928, 6.29645e-07)
bones/24/enabled = true bones/24/enabled = true
bones/24/position = Vector3(-2.23002e-07, 3.37928, 6.29645e-07) bones/24/position = Vector3(-2.23002e-07, 3.37928, 6.29645e-07)
bones/24/rotation = Quaternion(0.331506, -0.00251378, -0.0350197, 0.9428) bones/24/rotation = Quaternion(0.355641, -0.00404305, -0.0360694, 0.933917)
bones/24/scale = Vector3(1, 1, 1) bones/24/scale = Vector3(1, 1, 1)
bones/25/name = "RightHandRing3" bones/25/name = "RightHandRing3"
bones/25/parent = 24 bones/25/parent = 24
bones/25/rest = Transform3D(1, 0.000225504, -7.92068e-08, -0.000225504, 1, -5.28044e-06, 7.8016e-08, 5.28046e-06, 1, 7.95918e-07, 2.88969, -1.66403e-07) bones/25/rest = Transform3D(1, 0.000225504, -7.92068e-08, -0.000225504, 1, -5.28044e-06, 7.8016e-08, 5.28046e-06, 1, 7.95918e-07, 2.88969, -1.66403e-07)
bones/25/enabled = true bones/25/enabled = true
bones/25/position = Vector3(7.95918e-07, 2.88969, -1.66403e-07) bones/25/position = Vector3(1.71073e-05, 2.88969, 1.43613e-05)
bones/25/rotation = Quaternion(2.64023e-06, -3.93057e-08, -0.000112752, 1) bones/25/rotation = Quaternion(2.64023e-06, -3.93057e-08, -0.000112752, 1)
bones/25/scale = Vector3(1, 1, 1) bones/25/scale = Vector3(1, 1, 1)
bones/26/name = "RightHandRing4" bones/26/name = "RightHandRing4"
@@ -3475,20 +3476,20 @@ bones/27/parent = 10
bones/27/rest = Transform3D(0.999999, -0.00104089, 1.35743e-07, 0.00104089, 0.999999, -8.47695e-06, -1.26919e-07, 8.47709e-06, 1, -3.80628, 8.07669, 0.486713) bones/27/rest = Transform3D(0.999999, -0.00104089, 1.35743e-07, 0.00104089, 0.999999, -8.47695e-06, -1.26919e-07, 8.47709e-06, 1, -3.80628, 8.07669, 0.486713)
bones/27/enabled = true bones/27/enabled = true
bones/27/position = Vector3(-3.80628, 8.07668, 0.486696) bones/27/position = Vector3(-3.80628, 8.07668, 0.486696)
bones/27/rotation = Quaternion(0.207178, -0.0110322, 0.0925862, 0.97385) bones/27/rotation = Quaternion(0.293242, 0.0144781, 0.0775827, 0.952775)
bones/27/scale = Vector3(1, 1, 1) bones/27/scale = Vector3(1, 1, 1)
bones/28/name = "RightHandPinky2" bones/28/name = "RightHandPinky2"
bones/28/parent = 27 bones/28/parent = 27
bones/28/rest = Transform3D(0.999999, -0.00169266, 2.0762e-07, 0.00169266, 0.999999, 1.21108e-06, -2.0967e-07, -1.21073e-06, 1, 1.02501e-06, 3.6, -1.07715e-07) bones/28/rest = Transform3D(0.999999, -0.00169266, 2.0762e-07, 0.00169266, 0.999999, 1.21108e-06, -2.0967e-07, -1.21073e-06, 1, 1.02501e-06, 3.6, -1.07715e-07)
bones/28/enabled = true bones/28/enabled = true
bones/28/position = Vector3(1.02501e-06, 3.6, -1.07715e-07) bones/28/position = Vector3(1.02501e-06, 3.6, -1.07715e-07)
bones/28/rotation = Quaternion(0.360594, -0.0124003, -0.0686566, 0.93011) bones/28/rotation = Quaternion(0.398295, -0.018258, -0.0590211, 0.915175)
bones/28/scale = Vector3(1, 1, 1) bones/28/scale = Vector3(1, 1, 1)
bones/29/name = "RightHandPinky3" bones/29/name = "RightHandPinky3"
bones/29/parent = 28 bones/29/parent = 28
bones/29/rest = Transform3D(1, 0.000994016, -5.40032e-07, -0.000994016, 1, -7.1573e-06, 5.32917e-07, 7.15783e-06, 1, -1.01829e-06, 2.09999, -8.29957e-06) bones/29/rest = Transform3D(1, 0.000994016, -5.40032e-07, -0.000994016, 1, -7.1573e-06, 5.32917e-07, 7.15783e-06, 1, -1.01829e-06, 2.09999, -8.29957e-06)
bones/29/enabled = true bones/29/enabled = true
bones/29/position = Vector3(-2.89617e-06, 2.09998, 6.26796e-06) bones/29/position = Vector3(1.28513e-05, 2.09999, 2.33415e-06)
bones/29/rotation = Quaternion(3.57878e-06, -2.68237e-07, -0.000497008, 1) bones/29/rotation = Quaternion(3.57878e-06, -2.68237e-07, -0.000497008, 1)
bones/29/scale = Vector3(1, 1, 1) bones/29/scale = Vector3(1, 1, 1)
bones/30/name = "RightHandPinky4" bones/30/name = "RightHandPinky4"
@@ -3503,48 +3504,48 @@ bones/31/parent = 3
bones/31/rest = Transform3D(-0.205707, 0.977362, -0.0494651, 0.129002, -0.0230232, -0.991377, -0.970074, -0.210314, -0.121346, 4.57045, 11.1957, -0.806628) bones/31/rest = Transform3D(-0.205707, 0.977362, -0.0494651, 0.129002, -0.0230232, -0.991377, -0.970074, -0.210314, -0.121346, 4.57045, 11.1957, -0.806628)
bones/31/enabled = true bones/31/enabled = true
bones/31/position = Vector3(4.57045, 11.1957, -0.806628) bones/31/position = Vector3(4.57045, 11.1957, -0.806628)
bones/31/rotation = Quaternion(0.517946, 0.551775, -0.54517, 0.360647) bones/31/rotation = Quaternion(0.488057, 0.536105, -0.568538, 0.388789)
bones/31/scale = Vector3(1, 1, 1) bones/31/scale = Vector3(1, 1, 1)
bones/32/name = "LeftArm" bones/32/name = "LeftArm"
bones/32/parent = 31 bones/32/parent = 31
bones/32/rest = Transform3D(0.978561, -0.205707, -0.0101878, 0.20596, 0.977363, 0.0484042, 1.67638e-08, -0.0494647, 0.998776, 1.19209e-07, 10.8377, -7.69096e-07) bones/32/rest = Transform3D(0.978561, -0.205707, -0.0101878, 0.20596, 0.977363, 0.0484042, 1.67638e-08, -0.0494647, 0.998776, 1.19209e-07, 10.8377, -7.69096e-07)
bones/32/enabled = true bones/32/enabled = true
bones/32/position = Vector3(1.19209e-07, 10.8377, -7.69096e-07) bones/32/position = Vector3(1.19209e-07, 10.8377, -7.69096e-07)
bones/32/rotation = Quaternion(0.516773, -0.0569608, 0.13805, 0.842996) bones/32/rotation = Quaternion(0.185302, -0.209923, 0.138081, 0.950015)
bones/32/scale = Vector3(1, 1, 1) bones/32/scale = Vector3(1, 1, 1)
bones/33/name = "LeftForeArm" bones/33/name = "LeftForeArm"
bones/33/parent = 32 bones/33/parent = 32
bones/33/rest = Transform3D(1, -7.91888e-10, 1.53855e-09, 7.9189e-10, 1, -1.06455e-06, -1.53855e-09, 1.06455e-06, 1, 6.43076e-07, 27.8415, 7.54874e-06) bones/33/rest = Transform3D(1, -7.91888e-10, 1.53855e-09, 7.9189e-10, 1, -1.06455e-06, -1.53855e-09, 1.06455e-06, 1, 6.43076e-07, 27.8415, 7.54874e-06)
bones/33/enabled = true bones/33/enabled = true
bones/33/position = Vector3(6.43076e-07, 27.8415, 7.54874e-06) bones/33/position = Vector3(6.43076e-07, 27.8415, 7.54874e-06)
bones/33/rotation = Quaternion(-0.00950859, 0.0616187, 0.412386, 0.908873) bones/33/rotation = Quaternion(0.0734728, -0.0260904, 0.146778, 0.986092)
bones/33/scale = Vector3(1, 1, 1) bones/33/scale = Vector3(1, 1, 1)
bones/34/name = "LeftHand" bones/34/name = "LeftHand"
bones/34/parent = 33 bones/34/parent = 33
bones/34/rest = Transform3D(1, 1.34242e-08, -1.34244e-08, -1.34242e-08, 1, -2.38631e-07, 1.34244e-08, 2.38631e-07, 1, 6.6208e-06, 28.3288, 7.55342e-06) bones/34/rest = Transform3D(1, 1.34242e-08, -1.34244e-08, -1.34242e-08, 1, -2.38631e-07, 1.34244e-08, 2.38631e-07, 1, 6.6208e-06, 28.3288, 7.55342e-06)
bones/34/enabled = true bones/34/enabled = true
bones/34/position = Vector3(6.6208e-06, 28.3288, 7.55342e-06) bones/34/position = Vector3(6.6208e-06, 28.3288, 7.55342e-06)
bones/34/rotation = Quaternion(-0.129603, 0.138083, 0.0131147, 0.981817) bones/34/rotation = Quaternion(-0.269413, 0.00612019, 0.168673, 0.948118)
bones/34/scale = Vector3(1, 1, 1) bones/34/scale = Vector3(1, 1, 1)
bones/35/name = "LeftHandThumb1" bones/35/name = "LeftHandThumb1"
bones/35/parent = 34 bones/35/parent = 34
bones/35/rest = Transform3D(0.8891, -0.457712, -1.3113e-06, 0.395629, 0.768507, -0.502867, 0.230169, 0.447099, 0.864364, -2.68173, 2.46615, 1.57617) bones/35/rest = Transform3D(0.8891, -0.457712, -1.3113e-06, 0.395629, 0.768507, -0.502867, 0.230169, 0.447099, 0.864364, -2.68173, 2.46615, 1.57617)
bones/35/enabled = true bones/35/enabled = true
bones/35/position = Vector3(-2.68173, 2.46615, 1.57617) bones/35/position = Vector3(-2.68173, 2.46615, 1.57617)
bones/35/rotation = Quaternion(0.30643, -0.00752002, 0.157458, 0.93875) bones/35/rotation = Quaternion(0.284649, -0.0891071, 0.106222, 0.948553)
bones/35/scale = Vector3(1, 1, 1) bones/35/scale = Vector3(1, 1, 1)
bones/36/name = "LeftHandThumb2" bones/36/name = "LeftHandThumb2"
bones/36/parent = 35 bones/36/parent = 35
bones/36/rest = Transform3D(0.999863, 0.0164218, 0.00212004, -0.0164305, 0.999857, 0.00411473, -0.00205216, -0.004149, 0.999989, 3.03984e-06, 4.1871, 3.07148e-06) bones/36/rest = Transform3D(0.999863, 0.0164218, 0.00212004, -0.0164305, 0.999857, 0.00411473, -0.00205216, -0.004149, 0.999989, 3.03984e-06, 4.1871, 3.07148e-06)
bones/36/enabled = true bones/36/enabled = true
bones/36/position = Vector3(2.98023e-07, 4.18709, 1.43951e-05) bones/36/position = Vector3(2.98023e-07, 4.18709, 1.43951e-05)
bones/36/rotation = Quaternion(-0.00954947, 0.00154357, -0.00728264, 0.999927) bones/36/rotation = Quaternion(-0.012463, -0.00528461, -0.0347495, 0.999304)
bones/36/scale = Vector3(1, 1, 1) bones/36/scale = Vector3(1, 1, 1)
bones/37/name = "LeftHandThumb3" bones/37/name = "LeftHandThumb3"
bones/37/parent = 36 bones/37/parent = 36
bones/37/rest = Transform3D(0.999925, 0.0121444, 0.00150864, -0.012149, 0.999921, 0.00305249, -0.00147145, -0.00307059, 0.999994, 1.84774e-06, 3.41839, -4.41374e-07) bones/37/rest = Transform3D(0.999925, 0.0121444, 0.00150864, -0.012149, 0.999921, 0.00305249, -0.00147145, -0.00307059, 0.999994, 1.84774e-06, 3.41839, -4.41374e-07)
bones/37/enabled = true bones/37/enabled = true
bones/37/position = Vector3(1.84774e-06, 3.41839, -4.41374e-07) bones/37/position = Vector3(-2.23925e-06, 3.4184, -1.6558e-05)
bones/37/rotation = Quaternion(-0.0015308, 0.000745039, -0.00607346, 0.99998) bones/37/rotation = Quaternion(-0.0015308, 0.000745039, -0.00607346, 0.99998)
bones/37/scale = Vector3(1, 1, 1) bones/37/scale = Vector3(1, 1, 1)
bones/38/name = "LeftHandThumb4" bones/38/name = "LeftHandThumb4"
@@ -3559,20 +3560,20 @@ bones/39/parent = 34
bones/39/rest = Transform3D(1, 8.81505e-05, -2.88796e-08, -8.81505e-05, 1, -2.25531e-06, 2.86808e-08, 2.25531e-06, 1, -2.25986, 9.10932, 0.518009) bones/39/rest = Transform3D(1, 8.81505e-05, -2.88796e-08, -8.81505e-05, 1, -2.25531e-06, 2.86808e-08, 2.25531e-06, 1, -2.25986, 9.10932, 0.518009)
bones/39/enabled = true bones/39/enabled = true
bones/39/position = Vector3(-2.25986, 9.10932, 0.518024) bones/39/position = Vector3(-2.25986, 9.10932, 0.518024)
bones/39/rotation = Quaternion(0.0391226, -0.00600676, 0.0617774, 0.997305) bones/39/rotation = Quaternion(0.0830108, 0.0388407, 0.0514195, 0.994463)
bones/39/scale = Vector3(1, 1, 1) bones/39/scale = Vector3(1, 1, 1)
bones/40/name = "LeftHandIndex2" bones/40/name = "LeftHandIndex2"
bones/40/parent = 39 bones/40/parent = 39
bones/40/rest = Transform3D(1, -0.000210313, 1.21517e-07, 0.000210313, 1, -1.2441e-06, -1.21255e-07, 1.24412e-06, 1, -7.90296e-08, 3.70001, -2.50717e-05) bones/40/rest = Transform3D(1, -0.000210313, 1.21517e-07, 0.000210313, 1, -1.2441e-06, -1.21255e-07, 1.24412e-06, 1, -7.90296e-08, 3.70001, -2.50717e-05)
bones/40/enabled = true bones/40/enabled = true
bones/40/position = Vector3(-1.00166e-07, 3.69999, 4.91004e-06) bones/40/position = Vector3(-1.00166e-07, 3.69999, 4.91004e-06)
bones/40/rotation = Quaternion(0.14728, -0.000862923, -0.00634545, 0.989074) bones/40/rotation = Quaternion(0.162598, -0.00866607, -0.00498977, 0.986642)
bones/40/scale = Vector3(1, 1, 1) bones/40/scale = Vector3(1, 1, 1)
bones/41/name = "LeftHandIndex3" bones/41/name = "LeftHandIndex3"
bones/41/parent = 40 bones/41/parent = 40
bones/41/rest = Transform3D(1, 0.000132683, -2.41828e-07, -0.000132683, 1, -1.44972e-07, 2.41809e-07, 1.45004e-07, 1, -1.18063e-07, 2.85002, -7.28452e-06) bones/41/rest = Transform3D(1, 0.000132683, -2.41828e-07, -0.000132683, 1, -1.44972e-07, 2.41809e-07, 1.45004e-07, 1, -1.18063e-07, 2.85002, -7.28452e-06)
bones/41/enabled = true bones/41/enabled = true
bones/41/position = Vector3(-1.18063e-07, 2.85002, -7.28452e-06) bones/41/position = Vector3(-8.53018e-07, 2.85001, 4.62964e-06)
bones/41/rotation = Quaternion(7.24941e-08, -1.20909e-07, -6.63413e-05, 1) bones/41/rotation = Quaternion(7.24941e-08, -1.20909e-07, -6.63413e-05, 1)
bones/41/scale = Vector3(1, 1, 1) bones/41/scale = Vector3(1, 1, 1)
bones/42/name = "LeftHandIndex4" bones/42/name = "LeftHandIndex4"
@@ -3587,20 +3588,20 @@ bones/43/parent = 34
bones/43/rest = Transform3D(1, 6.33157e-05, -1.5605e-08, -6.33157e-05, 1, 1.85453e-06, 1.57224e-08, -1.85453e-06, 1, -3.57426e-05, 9.5334, -7.29997e-05) bones/43/rest = Transform3D(1, 6.33157e-05, -1.5605e-08, -6.33157e-05, 1, 1.85453e-06, 1.57224e-08, -1.85453e-06, 1, -3.57426e-05, 9.5334, -7.29997e-05)
bones/43/enabled = true bones/43/enabled = true
bones/43/position = Vector3(-3.58482e-05, 9.53341, -4.3386e-05) bones/43/position = Vector3(-3.58482e-05, 9.53341, -4.3386e-05)
bones/43/rotation = Quaternion(0.130331, 0.00472736, -0.0786464, 0.988335) bones/43/rotation = Quaternion(0.166169, -0.0258238, -0.0800847, 0.982501)
bones/43/scale = Vector3(1, 1, 1) bones/43/scale = Vector3(1, 1, 1)
bones/44/name = "LeftHandMiddle2" bones/44/name = "LeftHandMiddle2"
bones/44/parent = 43 bones/44/parent = 43
bones/44/rest = Transform3D(1, -4.26227e-05, 1.84394e-07, 4.26227e-05, 1, -5.17247e-06, -1.84174e-07, 5.17248e-06, 1, 7.8513e-07, 3.70001, 5.89059e-07) bones/44/rest = Transform3D(1, -4.26227e-05, 1.84394e-07, 4.26227e-05, 1, -5.17247e-06, -1.84174e-07, 5.17248e-06, 1, 7.8513e-07, 3.70001, 5.89059e-07)
bones/44/enabled = true bones/44/enabled = true
bones/44/position = Vector3(7.8513e-07, 3.70001, 5.89059e-07) bones/44/position = Vector3(7.8513e-07, 3.70001, 5.89059e-07)
bones/44/rotation = Quaternion(0.195279, -0.00139675, 0.0148042, 0.980635) bones/44/rotation = Quaternion(0.199962, 3.23689e-06, 0.0137906, 0.979707)
bones/44/scale = Vector3(1, 1, 1) bones/44/scale = Vector3(1, 1, 1)
bones/45/name = "LeftHandMiddle3" bones/45/name = "LeftHandMiddle3"
bones/45/parent = 44 bones/45/parent = 44
bones/45/rest = Transform3D(1, -4.10359e-05, -4.48878e-07, 4.10359e-05, 1, 5.17246e-06, 4.48666e-07, -5.17248e-06, 1, -7.74908e-07, 2.95, 6.69636e-06) bones/45/rest = Transform3D(1, -4.10359e-05, -4.48878e-07, 4.10359e-05, 1, 5.17246e-06, 4.48666e-07, -5.17248e-06, 1, -7.74908e-07, 2.95, 6.69636e-06)
bones/45/enabled = true bones/45/enabled = true
bones/45/position = Vector3(1.98097e-06, 2.94999, -3.74432e-06) bones/45/position = Vector3(-7.74908e-07, 2.95, 6.69636e-06)
bones/45/rotation = Quaternion(-2.58623e-06, -2.24386e-07, 2.0518e-05, 1) bones/45/rotation = Quaternion(-2.58623e-06, -2.24386e-07, 2.0518e-05, 1)
bones/45/scale = Vector3(1, 1, 1) bones/45/scale = Vector3(1, 1, 1)
bones/46/name = "LeftHandMiddle4" bones/46/name = "LeftHandMiddle4"
@@ -3615,14 +3616,14 @@ bones/47/parent = 34
bones/47/rest = Transform3D(1, -1.26778e-05, 1.44174e-07, 1.26778e-05, 1, 1.85554e-06, -1.44198e-07, -1.85554e-06, 1, 1.86508, 9.10454, 0.0429883) bones/47/rest = Transform3D(1, -1.26778e-05, 1.44174e-07, 1.26778e-05, 1, 1.85554e-06, -1.44198e-07, -1.85554e-06, 1, 1.86508, 9.10454, 0.0429883)
bones/47/enabled = true bones/47/enabled = true
bones/47/position = Vector3(1.86508, 9.10454, 0.0430176) bones/47/position = Vector3(1.86508, 9.10454, 0.0430176)
bones/47/rotation = Quaternion(0.270353, -0.0159107, -0.123873, 0.954627) bones/47/rotation = Quaternion(0.289842, -0.0611307, -0.118318, 0.947763)
bones/47/scale = Vector3(1, 1, 1) bones/47/scale = Vector3(1, 1, 1)
bones/48/name = "LeftHandRing2" bones/48/name = "LeftHandRing2"
bones/48/parent = 47 bones/48/parent = 47
bones/48/rest = Transform3D(1, 7.29823e-08, -5.63593e-08, -7.29826e-08, 1, -5.17351e-06, 5.63589e-08, 5.17351e-06, 1, 7.46404e-07, 3.15002, 2.05661e-06) bones/48/rest = Transform3D(1, 7.29823e-08, -5.63593e-08, -7.29826e-08, 1, -5.17351e-06, 5.63589e-08, 5.17351e-06, 1, 7.46404e-07, 3.15002, 2.05661e-06)
bones/48/enabled = true bones/48/enabled = true
bones/48/position = Vector3(7.46404e-07, 3.15002, 2.05661e-06) bones/48/position = Vector3(7.46404e-07, 3.15002, 2.05661e-06)
bones/48/rotation = Quaternion(0.28123, 0.00175925, 0.024472, 0.959327) bones/48/rotation = Quaternion(0.289539, -0.000320947, 0.024351, 0.956857)
bones/48/scale = Vector3(1, 1, 1) bones/48/scale = Vector3(1, 1, 1)
bones/49/name = "LeftHandRing3" bones/49/name = "LeftHandRing3"
bones/49/parent = 48 bones/49/parent = 48
@@ -3643,20 +3644,20 @@ bones/51/parent = 34
bones/51/rest = Transform3D(0.999992, -0.00408962, 4.99198e-08, 0.00408962, 0.999992, 1.03318e-05, -9.21724e-08, -1.03315e-05, 1, 3.80626, 8.07779, 0.486838) bones/51/rest = Transform3D(0.999992, -0.00408962, 4.99198e-08, 0.00408962, 0.999992, 1.03318e-05, -9.21724e-08, -1.03315e-05, 1, 3.80626, 8.07779, 0.486838)
bones/51/enabled = true bones/51/enabled = true
bones/51/position = Vector3(3.80626, 8.07779, 0.486867) bones/51/position = Vector3(3.80626, 8.07779, 0.486867)
bones/51/rotation = Quaternion(0.296451, -0.0164067, -0.155512, 0.942159) bones/51/rotation = Quaternion(0.327025, -0.0820818, -0.129876, 0.932443)
bones/51/scale = Vector3(1, 1, 1) bones/51/scale = Vector3(1, 1, 1)
bones/52/name = "LeftHandPinky2" bones/52/name = "LeftHandPinky2"
bones/52/parent = 51 bones/52/parent = 51
bones/52/rest = Transform3D(1, 0.000421534, -2.89811e-07, -0.000421534, 1, 6.05504e-06, 2.92363e-07, -6.05491e-06, 1, 5.8622e-07, 3.59999, 1.86631e-05) bones/52/rest = Transform3D(1, 0.000421534, -2.89811e-07, -0.000421534, 1, 6.05504e-06, 2.92363e-07, -6.05491e-06, 1, 5.8622e-07, 3.59999, 1.86631e-05)
bones/52/enabled = true bones/52/enabled = true
bones/52/position = Vector3(-9.29924e-07, 3.59999, -1.33763e-05) bones/52/position = Vector3(-9.29924e-07, 3.59999, -1.33763e-05)
bones/52/rotation = Quaternion(0.341773, 0.01139, 0.0494713, 0.93841) bones/52/rotation = Quaternion(0.35166, 0.00795197, 0.0407161, 0.935208)
bones/52/scale = Vector3(1, 1, 1) bones/52/scale = Vector3(1, 1, 1)
bones/53/name = "LeftHandPinky3" bones/53/name = "LeftHandPinky3"
bones/53/parent = 52 bones/53/parent = 52
bones/53/rest = Transform3D(1, 0.000133311, 1.0368e-06, -0.000133311, 1, -1.45322e-05, -1.03874e-06, 1.45321e-05, 1, -3.25512e-07, 2.10003, 1.47155e-05) bones/53/rest = Transform3D(1, 0.000133311, 1.0368e-06, -0.000133311, 1, -1.45322e-05, -1.03874e-06, 1.45321e-05, 1, -3.25512e-07, 2.10003, 1.47155e-05)
bones/53/enabled = true bones/53/enabled = true
bones/53/position = Vector3(4.83308e-06, 2.10001, 3.18113e-06) bones/53/position = Vector3(-3.25512e-07, 2.10003, 1.47155e-05)
bones/53/rotation = Quaternion(7.26606e-06, 5.18884e-07, -6.66557e-05, 1) bones/53/rotation = Quaternion(7.26606e-06, 5.18884e-07, -6.66557e-05, 1)
bones/53/scale = Vector3(1, 1, 1) bones/53/scale = Vector3(1, 1, 1)
bones/54/name = "LeftHandPinky4" bones/54/name = "LeftHandPinky4"
@@ -3671,28 +3672,28 @@ bones/55/parent = 0
bones/55/rest = Transform3D(-1, -5.15831e-07, -6.28369e-08, 5.14419e-07, -0.999785, 0.0207118, -7.35073e-08, 0.0207118, 0.999785, -8.20779, -6.77175, -1.51222) bones/55/rest = Transform3D(-1, -5.15831e-07, -6.28369e-08, 5.14419e-07, -0.999785, 0.0207118, -7.35073e-08, 0.0207118, 0.999785, -8.20779, -6.77175, -1.51222)
bones/55/enabled = true bones/55/enabled = true
bones/55/position = Vector3(-8.20779, -6.77175, -1.51222) bones/55/position = Vector3(-8.20779, -6.77175, -1.51222)
bones/55/rotation = Quaternion(-0.125224, 0.0330876, 0.983932, 0.122891) bones/55/rotation = Quaternion(-0.171821, 0.578667, 0.782421, 0.153099)
bones/55/scale = Vector3(1, 1, 1) bones/55/scale = Vector3(1, 1, 1)
bones/56/name = "RightLeg" bones/56/name = "RightLeg"
bones/56/parent = 55 bones/56/parent = 55
bones/56/rest = Transform3D(1, -3.11163e-08, -6.95594e-08, 3.63214e-08, 0.997098, 0.0761275, 6.69888e-08, -0.0761275, 0.997098, 7.40101e-07, 44.3715, -4.82482e-08) bones/56/rest = Transform3D(1, -3.11163e-08, -6.95594e-08, 3.63214e-08, 0.997098, 0.0761275, 6.69888e-08, -0.0761275, 0.997098, 7.40101e-07, 44.3715, -4.82482e-08)
bones/56/enabled = true bones/56/enabled = true
bones/56/position = Vector3(7.40101e-07, 44.3715, -4.82482e-08) bones/56/position = Vector3(7.40101e-07, 44.3715, -4.82482e-08)
bones/56/rotation = Quaternion(-0.312132, 0.0769527, -0.023537, 0.946625) bones/56/rotation = Quaternion(-0.914553, -0.0261421, 0.0810702, 0.395396)
bones/56/scale = Vector3(1, 1, 1) bones/56/scale = Vector3(1, 1, 1)
bones/57/name = "RightFoot" bones/57/name = "RightFoot"
bones/57/parent = 56 bones/57/parent = 56
bones/57/rest = Transform3D(1, 2.89989e-07, -6.30721e-08, -2.18905e-07, 0.577278, -0.816548, -2.00379e-07, 0.816548, 0.577278, -1.88774e-07, 44.5278, 5.80588e-07) bones/57/rest = Transform3D(1, 2.89989e-07, -6.30721e-08, -2.18905e-07, 0.577278, -0.816548, -2.00379e-07, 0.816548, 0.577278, -1.88774e-07, 44.5278, 5.80588e-07)
bones/57/enabled = true bones/57/enabled = true
bones/57/position = Vector3(-1.88774e-07, 44.5278, 5.80588e-07) bones/57/position = Vector3(-1.88774e-07, 44.5278, 5.80588e-07)
bones/57/rotation = Quaternion(0.60249, 0.0647094, 0.130377, 0.784742) bones/57/rotation = Quaternion(0.264136, 0.0252433, 0.0430909, 0.963192)
bones/57/scale = Vector3(1, 1, 1) bones/57/scale = Vector3(1, 1, 1)
bones/58/name = "RightToeBase" bones/58/name = "RightToeBase"
bones/58/parent = 57 bones/58/parent = 57
bones/58/rest = Transform3D(1, 1.2381e-07, -1.08868e-07, -1.64751e-07, 0.775226, -0.631684, 6.18842e-09, 0.631684, 0.775226, -5.1651e-07, 13.8169, -1.90205e-06) bones/58/rest = Transform3D(1, 1.2381e-07, -1.08868e-07, -1.64751e-07, 0.775226, -0.631684, 6.18842e-09, 0.631684, 0.775226, -5.1651e-07, 13.8169, -1.90205e-06)
bones/58/enabled = true bones/58/enabled = true
bones/58/position = Vector3(-5.1651e-07, 13.8169, -1.90205e-06) bones/58/position = Vector3(-5.1651e-07, 13.8169, -1.90205e-06)
bones/58/rotation = Quaternion(0.349907, 0.00380851, -0.00196649, 0.936775) bones/58/rotation = Quaternion(0.317939, -1.00007e-07, -1.98108e-07, 0.948111)
bones/58/scale = Vector3(1, 1, 1) bones/58/scale = Vector3(1, 1, 1)
bones/59/name = "RightToe_End" bones/59/name = "RightToe_End"
bones/59/parent = 58 bones/59/parent = 58
@@ -3706,28 +3707,28 @@ bones/60/parent = 0
bones/60/rest = Transform3D(-1, -5.37325e-07, -1.73336e-07, 5.33615e-07, -0.999785, 0.0207348, -1.84441e-07, 0.0207348, 0.999785, 8.20779, -6.77179, -1.51221) bones/60/rest = Transform3D(-1, -5.37325e-07, -1.73336e-07, 5.33615e-07, -0.999785, 0.0207348, -1.84441e-07, 0.0207348, 0.999785, 8.20779, -6.77179, -1.51221)
bones/60/enabled = true bones/60/enabled = true
bones/60/position = Vector3(8.20779, -6.77179, -1.51221) bones/60/position = Vector3(8.20779, -6.77179, -1.51221)
bones/60/rotation = Quaternion(0.0792667, 0.219792, 0.967082, -0.100803) bones/60/rotation = Quaternion(0.15404, 0.603026, 0.780016, -0.0648573)
bones/60/scale = Vector3(1, 1, 1) bones/60/scale = Vector3(1, 1, 1)
bones/61/name = "LeftLeg" bones/61/name = "LeftLeg"
bones/61/parent = 60 bones/61/parent = 60
bones/61/rest = Transform3D(1, -2.27105e-08, -2.66928e-07, 4.29763e-08, 0.997095, 0.0761695, 2.64423e-07, -0.0761695, 0.997095, 8.49408e-07, 44.3714, 5.43912e-09) bones/61/rest = Transform3D(1, -2.27105e-08, -2.66928e-07, 4.29763e-08, 0.997095, 0.0761695, 2.64423e-07, -0.0761695, 0.997095, 8.49408e-07, 44.3714, 5.43912e-09)
bones/61/enabled = true bones/61/enabled = true
bones/61/position = Vector3(8.49408e-07, 44.3714, 5.43912e-09) bones/61/position = Vector3(8.49408e-07, 44.3714, 5.43912e-09)
bones/61/rotation = Quaternion(-0.322391, 0.118689, -0.033498, 0.938539) bones/61/rotation = Quaternion(-0.898276, -0.00139739, 0.0107046, 0.439299)
bones/61/scale = Vector3(1, 1, 1) bones/61/scale = Vector3(1, 1, 1)
bones/62/name = "LeftFoot" bones/62/name = "LeftFoot"
bones/62/parent = 61 bones/62/parent = 61
bones/62/rest = Transform3D(1, 2.78454e-07, -1.41493e-07, -2.76279e-07, 0.577262, -0.816559, -1.45696e-07, 0.816559, 0.577262, 6.62281e-07, 44.5279, 6.18865e-08) bones/62/rest = Transform3D(1, 2.78454e-07, -1.41493e-07, -2.76279e-07, 0.577262, -0.816559, -1.45696e-07, 0.816559, 0.577262, 6.62281e-07, 44.5279, 6.18865e-08)
bones/62/enabled = true bones/62/enabled = true
bones/62/position = Vector3(6.62281e-07, 44.5279, 6.18865e-08) bones/62/position = Vector3(6.62281e-07, 44.5279, 6.18865e-08)
bones/62/rotation = Quaternion(0.501358, -0.0276068, -0.0559521, 0.862988) bones/62/rotation = Quaternion(0.40896, -0.0618288, -0.11995, 0.902519)
bones/62/scale = Vector3(1, 1, 1) bones/62/scale = Vector3(1, 1, 1)
bones/63/name = "LeftToeBase" bones/63/name = "LeftToeBase"
bones/63/parent = 62 bones/63/parent = 62
bones/63/rest = Transform3D(1, 2.69095e-07, -3.98352e-08, -2.33773e-07, 0.775226, -0.631684, -1.39102e-07, 0.631683, 0.775226, 6.41195e-07, 13.8169, 3.10636e-07) bones/63/rest = Transform3D(1, 2.69095e-07, -3.98352e-08, -2.33773e-07, 0.775226, -0.631684, -1.39102e-07, 0.631683, 0.775226, 6.41195e-07, 13.8169, 3.10636e-07)
bones/63/enabled = true bones/63/enabled = true
bones/63/position = Vector3(6.41195e-07, 13.8169, 3.10636e-07) bones/63/position = Vector3(6.41195e-07, 13.8169, 3.10636e-07)
bones/63/rotation = Quaternion(0.354259, 0.0166236, -0.0238483, 0.934695) bones/63/rotation = Quaternion(0.34735, -4.64981e-08, -4.88551e-08, 0.937736)
bones/63/scale = Vector3(1, 1, 1) bones/63/scale = Vector3(1, 1, 1)
bones/64/name = "LeftToe_End" bones/64/name = "LeftToe_End"
bones/64/parent = 63 bones/64/parent = 63
@@ -3745,14 +3746,6 @@ skin = SubResource("Skin_l3wpu")
mesh = SubResource("ArrayMesh_1w418") mesh = SubResource("ArrayMesh_1w418")
skin = SubResource("Skin_l3wpu") skin = SubResource("Skin_l3wpu")
[node name="BoneAttachment3D" type="BoneAttachment3D" parent="Mesh/Armature/Skeleton3D"]
transform = Transform3D(0.997622, -0.0681419, -0.0103325, 0.0170896, 0.0993391, 0.994907, -0.0667685, -0.992718, 0.100267, -3.16332, 22.4968, -177.889)
bone_name = "HeadTop_End"
bone_idx = 6
[node name="CameraFPS" type="Camera3D" parent="Mesh/Armature/Skeleton3D/BoneAttachment3D"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
[node name="CollisionShape3D" type="CollisionShape3D" parent="."] [node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.908729, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.908729, 0)
shape = SubResource("CapsuleShape3D_mm42w") shape = SubResource("CapsuleShape3D_mm42w")
@@ -3765,7 +3758,6 @@ spring_length = 2.0
margin = 0.2 margin = 0.2
[node name="Camera3D" type="Camera3D" parent="SpringArmPivot/SpringArm3D"] [node name="Camera3D" type="Camera3D" parent="SpringArmPivot/SpringArm3D"]
current = true
[node name="AnimationPlayer" type="AnimationPlayer" parent="."] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
root_node = NodePath("../Mesh") root_node = NodePath("../Mesh")
@@ -3779,6 +3771,6 @@ callback_mode_process = 0
tree_root = SubResource("AnimationNodeBlendTree_dptuf") tree_root = SubResource("AnimationNodeBlendTree_dptuf")
anim_player = NodePath("../AnimationPlayer") anim_player = NodePath("../AnimationPlayer")
parameters/ground_air_transition/current_state = "air" parameters/ground_air_transition/current_state = "air"
parameters/ground_air_transition/transition_request = "" parameters/ground_air_transition/transition_request = "air"
parameters/ground_air_transition/current_index = 1 parameters/ground_air_transition/current_index = 1
parameters/iwr_blend/blend_amount = -1.0 parameters/iwr_blend/blend_amount = -1.0

File diff suppressed because one or more lines are too long

View File

@@ -1,92 +0,0 @@
[gd_scene load_steps=18 format=3 uid="uid://coue2qehpn4fr"]
[ext_resource type="Texture2D" path="res://Assets/Textures/Black.png" id="1_hwes2"]
[ext_resource type="Texture2D" path="res://Assets/Textures/Sky.png" id="1_rrvcb"]
[ext_resource type="Texture2D" path="res://Assets/Textures/Orange.png" id="2_087ax"]
[ext_resource type="Texture2D" path="res://Assets/Textures/Green.png" id="3_qkav0"]
[ext_resource type="PackedScene" path="res://Scenes/Characters/player.tscn" id="5_2382e"]
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_6c4vd"]
panorama = ExtResource("1_rrvcb")
[sub_resource type="Sky" id="Sky_5ngqa"]
sky_material = SubResource("PanoramaSkyMaterial_6c4vd")
[sub_resource type="Environment" id="Environment_ctwiv"]
background_mode = 2
sky = SubResource("Sky_5ngqa")
tonemap_mode = 2
glow_enabled = true
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ajchh"]
albedo_texture = ExtResource("1_hwes2")
uv1_triplanar = true
[sub_resource type="PlaneMesh" id="PlaneMesh_mmup0"]
material = SubResource("StandardMaterial3D_ajchh")
size = Vector2(50, 50)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_26ptr"]
data = PackedVector3Array(25, 0, 25, -25, 0, 25, 25, 0, -25, -25, 0, 25, -25, 0, -25, 25, 0, -25)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_jkvud"]
albedo_texture = ExtResource("2_087ax")
uv1_triplanar = true
[sub_resource type="BoxMesh" id="BoxMesh_plpqy"]
material = SubResource("StandardMaterial3D_jkvud")
size = Vector3(10, 3, 1)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_v7prx"]
data = PackedVector3Array(-5, 1.5, 0.5, 5, 1.5, 0.5, -5, -1.5, 0.5, 5, 1.5, 0.5, 5, -1.5, 0.5, -5, -1.5, 0.5, 5, 1.5, -0.5, -5, 1.5, -0.5, 5, -1.5, -0.5, -5, 1.5, -0.5, -5, -1.5, -0.5, 5, -1.5, -0.5, 5, 1.5, 0.5, 5, 1.5, -0.5, 5, -1.5, 0.5, 5, 1.5, -0.5, 5, -1.5, -0.5, 5, -1.5, 0.5, -5, 1.5, -0.5, -5, 1.5, 0.5, -5, -1.5, -0.5, -5, 1.5, 0.5, -5, -1.5, 0.5, -5, -1.5, -0.5, 5, 1.5, 0.5, -5, 1.5, 0.5, 5, 1.5, -0.5, -5, 1.5, 0.5, -5, 1.5, -0.5, 5, 1.5, -0.5, -5, -1.5, 0.5, 5, -1.5, 0.5, -5, -1.5, -0.5, 5, -1.5, 0.5, 5, -1.5, -0.5, -5, -1.5, -0.5)
[sub_resource type="PrismMesh" id="PrismMesh_0l7qq"]
left_to_right = -2.0
size = Vector3(5, 5, 5)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_pfpgv"]
albedo_texture = ExtResource("3_qkav0")
uv1_triplanar = true
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_rit6o"]
data = PackedVector3Array(-12.5, 2.5, 2.5, 2.5, -2.5, 2.5, -2.5, -2.5, 2.5, -12.5, 2.5, -2.5, -2.5, -2.5, -2.5, 2.5, -2.5, -2.5, -12.5, 2.5, 2.5, -12.5, 2.5, -2.5, 2.5, -2.5, 2.5, -12.5, 2.5, -2.5, 2.5, -2.5, -2.5, 2.5, -2.5, 2.5, -12.5, 2.5, -2.5, -12.5, 2.5, 2.5, -2.5, -2.5, -2.5, -12.5, 2.5, 2.5, -2.5, -2.5, 2.5, -2.5, -2.5, -2.5, -2.5, -2.5, 2.5, 2.5, -2.5, 2.5, -2.5, -2.5, -2.5, 2.5, -2.5, 2.5, 2.5, -2.5, -2.5, -2.5, -2.5, -2.5)
[node name="Prototype" type="Node3D"]
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_ctwiv")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.866026, -0.433013, 0.249999, 0.5, -0.75, 0.433012, -1.3411e-07, 0.499999, 0.866026, 0, 0, 0)
shadow_enabled = true
[node name="Floor" type="MeshInstance3D" parent="."]
mesh = SubResource("PlaneMesh_mmup0")
[node name="StaticBody3D" type="StaticBody3D" parent="Floor"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Floor/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_26ptr")
[node name="Wall" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, -3)
mesh = SubResource("BoxMesh_plpqy")
[node name="StaticBody3D" type="StaticBody3D" parent="Wall"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Wall/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_v7prx")
[node name="Slope" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 1, 4)
mesh = SubResource("PrismMesh_0l7qq")
surface_material_override/0 = SubResource("StandardMaterial3D_pfpgv")
[node name="StaticBody3D" type="StaticBody3D" parent="Slope"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Slope/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_rit6o")
[node name="Player" parent="." instance=ExtResource("5_2382e")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0130468, 0)
velocity = Vector3(0, 0, 0)

View File

@@ -0,0 +1,155 @@
[gd_scene load_steps=19 format=3 uid="uid://coue2qehpn4fr"]
[ext_resource type="Texture2D" uid="uid://dujfl12rge3p4" path="res://Assets/Textures/Sky.png" id="1_mnexj"]
[ext_resource type="Texture2D" uid="uid://b8n5rff2a8h2u" path="res://Assets/Textures/Black.png" id="2_fkwcn"]
[ext_resource type="Texture2D" uid="uid://lpbttkw7gpxj" path="res://Assets/Textures/Orange.png" id="3_ux02w"]
[ext_resource type="Texture2D" uid="uid://di3uyny341483" path="res://Assets/Textures/Green.png" id="4_wp15n"]
[ext_resource type="PackedScene" uid="uid://d38w4ae3qj0k4" path="res://Scenes/Characters/first_person_player.tscn" id="5_8ctht"]
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_6c4vd"]
panorama = ExtResource("1_mnexj")
[sub_resource type="Sky" id="Sky_5ngqa"]
sky_material = SubResource("PanoramaSkyMaterial_6c4vd")
[sub_resource type="Environment" id="Environment_ctwiv"]
background_mode = 2
sky = SubResource("Sky_5ngqa")
tonemap_mode = 2
glow_enabled = true
[sub_resource type="NavigationMesh" id="NavigationMesh_2pdqo"]
vertices = PackedVector3Array(-5.25, 0.5, 1, -5, 0.5, -1.75, -5.5, 0.5, -2, -11.25, 0.5, 1, -5.5, 0.5, -3.75, -3.25, 0.5, -4, -3.25, 0.5, -24.5, -11.25, 0.5, 1, -5.5, 0.5, -2, -5.5, 0.5, -3.75, -24.5, 0.5, 3.25, -11.5, 0.5, 3.25, -11.25, 0.5, 1, -24.5, 0.5, 3.25, -11.25, 0.5, 1, -5.5, 0.5, -3.75, -3.25, 0.5, -24.5, -24.5, 0.5, -24.5, -3.25, 0.5, -4, 3.5, 0.5, -4, 3.5, 0.5, -24.5, -3.25, 0.5, -24.5, 5.5, 0.5, -4, 5.75, 0.5, -3, 24.5, 0.5, -3, 24.5, 0.5, -24.5, 3.5, 0.5, -24.5, 3.5, 0.5, -24.5, 3.5, 0.5, -4, 5.5, 0.5, -4, -5, 0.5, -1.75, -5.25, 0.5, 1, -5, 0.75, 2, 5.25, 0.5, -1.75, -5, 0.75, 2, -7.25, 1.5, 2, -7.25, 1.5, 6, -5, 0.75, 6.25, 24.5, 0.5, -3, 5.75, 0.5, -3, 5.25, 0.5, -1.75, -5.25, 0.5, 7.25, -6.75, 0.5, 7.25, -6.5, 0.5, 24.5, 5.25, 0.5, -1.75, -5, 0.75, 2, -5, 0.75, 6.25, 5.25, 0.5, -1.75, -5, 0.75, 6.25, -5.25, 0.5, 7.25, -6.5, 0.5, 24.5, 24.5, 0.5, 24.5, 24.5, 0.5, -3, -7.25, 1.5, 6, -7.25, 1.5, 2, -14, 3.75, 2, -14, 3.75, 6, -11.5, 0.5, 7, -11.5, 0.5, 3.25, -24.5, 0.5, 3.25, -10, 0.5, 24.5, -9.75, 0.5, 7.25, -11.5, 0.5, 7, -11.5, 0.5, 7, -24.5, 0.5, 3.25, -24.5, 0.5, 24.5, -10, 0.5, 24.5, -10, 0.5, 24.5, -6.5, 0.5, 24.5, -6.75, 0.5, 7.25, -9.75, 0.5, 7.25)
polygons = [PackedInt32Array(1, 0, 2), PackedInt32Array(2, 0, 3), PackedInt32Array(6, 5, 4), PackedInt32Array(7, 9, 8), PackedInt32Array(12, 11, 10), PackedInt32Array(14, 13, 15), PackedInt32Array(15, 13, 16), PackedInt32Array(16, 13, 17), PackedInt32Array(21, 20, 18), PackedInt32Array(18, 20, 19), PackedInt32Array(23, 22, 24), PackedInt32Array(24, 22, 25), PackedInt32Array(25, 22, 26), PackedInt32Array(29, 28, 27), PackedInt32Array(31, 30, 32), PackedInt32Array(32, 30, 33), PackedInt32Array(35, 34, 36), PackedInt32Array(36, 34, 37), PackedInt32Array(40, 39, 38), PackedInt32Array(43, 42, 41), PackedInt32Array(46, 45, 44), PackedInt32Array(48, 47, 49), PackedInt32Array(49, 47, 50), PackedInt32Array(50, 47, 52), PackedInt32Array(50, 52, 51), PackedInt32Array(56, 55, 53), PackedInt32Array(53, 55, 54), PackedInt32Array(59, 58, 57), PackedInt32Array(62, 61, 60), PackedInt32Array(66, 65, 63), PackedInt32Array(63, 65, 64), PackedInt32Array(70, 69, 67), PackedInt32Array(67, 69, 68)]
agent_radius = 0.4
agent_max_slope = 60.0
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ajchh"]
albedo_texture = ExtResource("2_fkwcn")
uv1_triplanar = true
[sub_resource type="PlaneMesh" id="PlaneMesh_mmup0"]
material = SubResource("StandardMaterial3D_ajchh")
size = Vector2(50, 50)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_26ptr"]
data = PackedVector3Array(25, 0, 25, -25, 0, 25, 25, 0, -25, -25, 0, 25, -25, 0, -25, 25, 0, -25)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_jkvud"]
albedo_texture = ExtResource("3_ux02w")
uv1_triplanar = true
[sub_resource type="BoxMesh" id="BoxMesh_plpqy"]
material = SubResource("StandardMaterial3D_jkvud")
size = Vector3(10, 3, 1)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_v7prx"]
data = PackedVector3Array(-5, 1.5, 0.5, 5, 1.5, 0.5, -5, -1.5, 0.5, 5, 1.5, 0.5, 5, -1.5, 0.5, -5, -1.5, 0.5, 5, 1.5, -0.5, -5, 1.5, -0.5, 5, -1.5, -0.5, -5, 1.5, -0.5, -5, -1.5, -0.5, 5, -1.5, -0.5, 5, 1.5, 0.5, 5, 1.5, -0.5, 5, -1.5, 0.5, 5, 1.5, -0.5, 5, -1.5, -0.5, 5, -1.5, 0.5, -5, 1.5, -0.5, -5, 1.5, 0.5, -5, -1.5, -0.5, -5, 1.5, 0.5, -5, -1.5, 0.5, -5, -1.5, -0.5, 5, 1.5, 0.5, -5, 1.5, 0.5, 5, 1.5, -0.5, -5, 1.5, 0.5, -5, 1.5, -0.5, 5, 1.5, -0.5, -5, -1.5, 0.5, 5, -1.5, 0.5, -5, -1.5, -0.5, 5, -1.5, 0.5, 5, -1.5, -0.5, -5, -1.5, -0.5)
[sub_resource type="PrismMesh" id="PrismMesh_0l7qq"]
left_to_right = -2.0
size = Vector3(5, 5, 5)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_pfpgv"]
albedo_texture = ExtResource("4_wp15n")
uv1_triplanar = true
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_rit6o"]
data = PackedVector3Array(-12.5, 2.5, 2.5, 2.5, -2.5, 2.5, -2.5, -2.5, 2.5, -12.5, 2.5, -2.5, -2.5, -2.5, -2.5, 2.5, -2.5, -2.5, -12.5, 2.5, 2.5, -12.5, 2.5, -2.5, 2.5, -2.5, 2.5, -12.5, 2.5, -2.5, 2.5, -2.5, -2.5, 2.5, -2.5, 2.5, -12.5, 2.5, -2.5, -12.5, 2.5, 2.5, -2.5, -2.5, -2.5, -12.5, 2.5, 2.5, -2.5, -2.5, 2.5, -2.5, -2.5, -2.5, -2.5, -2.5, 2.5, 2.5, -2.5, 2.5, -2.5, -2.5, -2.5, 2.5, -2.5, 2.5, 2.5, -2.5, -2.5, -2.5, -2.5, -2.5)
[node name="World" type="World"]
[node name="Map" type="Node3D" parent="."]
[node name="WorldEnvironment" type="WorldEnvironment" parent="Map"]
environment = SubResource("Environment_ctwiv")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="Map"]
transform = Transform3D(-0.866026, -0.433013, 0.249999, 0.5, -0.750001, 0.433012, -1.3411e-07, 0.499999, 0.866026, 0, 0, 0)
shadow_enabled = true
[node name="NavigationRegion3D" type="NavigationRegion3D" parent="Map"]
navigation_mesh = SubResource("NavigationMesh_2pdqo")
[node name="Floor" type="MeshInstance3D" parent="Map/NavigationRegion3D"]
mesh = SubResource("PlaneMesh_mmup0")
skeleton = NodePath("../../..")
[node name="StaticBody3D" type="StaticBody3D" parent="Map/NavigationRegion3D/Floor"]
collision_layer = 3
collision_mask = 3
[node name="CollisionShape3D" type="CollisionShape3D" parent="Map/NavigationRegion3D/Floor/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_26ptr")
[node name="Wall" type="MeshInstance3D" parent="Map/NavigationRegion3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, -3)
mesh = SubResource("BoxMesh_plpqy")
skeleton = NodePath("../../..")
[node name="StaticBody3D" type="StaticBody3D" parent="Map/NavigationRegion3D/Wall"]
collision_layer = 3
collision_mask = 3
[node name="CollisionShape3D" type="CollisionShape3D" parent="Map/NavigationRegion3D/Wall/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_v7prx")
[node name="Slope" type="MeshInstance3D" parent="Map/NavigationRegion3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 1, 4)
mesh = SubResource("PrismMesh_0l7qq")
skeleton = NodePath("../../..")
surface_material_override/0 = SubResource("StandardMaterial3D_pfpgv")
[node name="StaticBody3D" type="StaticBody3D" parent="Map/NavigationRegion3D/Slope"]
collision_layer = 3
collision_mask = 3
[node name="CollisionShape3D" type="CollisionShape3D" parent="Map/NavigationRegion3D/Slope/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_rit6o")
[node name="Spawns" type="Node3D" parent="Map"]
[node name="Spawn1" type="Node3D" parent="Map/Spawns"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 18.6089)
[node name="Spawn2" type="Node3D" parent="Map/Spawns"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18.8451, 0, 18.6089)
[node name="Spawn3" type="Node3D" parent="Map/Spawns"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18.8451, 0, 0.0245247)
[node name="Spawn4" type="Node3D" parent="Map/Spawns"]
transform = Transform3D(-0.269021, -0.963134, 0, 0.963134, -0.269021, 0, 0, 0, 1, 19.0777, 0, -20.2546)
[node name="Spawn5" type="Node3D" parent="Map/Spawns"]
transform = Transform3D(-0.269021, -0.963134, 0, 0.963134, -0.269021, 0, 0, 0, 1, 1.64303, 0, -20.2546)
[node name="Spawn6" type="Node3D" parent="Map/Spawns"]
transform = Transform3D(-0.269021, -0.963134, 0, 0.963134, -0.269021, 0, 0, 0, 1, -19.0255, 0, -20.2546)
[node name="Spawn7" type="Node3D" parent="Map/Spawns"]
transform = Transform3D(-0.269021, -0.963134, 0, 0.963134, -0.269021, 0, 0, 0, 1, -19.0255, 0, 0.256641)
[node name="Spawn8" type="Node3D" parent="Map/Spawns"]
transform = Transform3D(-0.269021, -0.963134, 0, 0.963134, -0.269021, 0, 0, 0, 1, -19.0255, 0, 16.4132)
[node name="FirstPersonPlayer" parent="." instance=ExtResource("5_8ctht")]
[node name="UI" type="Control" parent="."]
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="HitRect" type="ColorRect" parent="UI"]
visible = false
layout_mode = 0
offset_left = -177.0
offset_top = -96.0
offset_right = 1365.0
offset_bottom = 780.0
color = Color(1, 0, 0, 0.34902)
[node name="ZombieSpawnTimer" type="Timer" parent="."]
wait_time = 5.0
autostart = true

View File

@@ -0,0 +1,54 @@
[gd_scene load_steps=6 format=3 uid="uid://do601jl7p1u22"]
[sub_resource type="BoxMesh" id="BoxMesh_ibwn0"]
size = Vector3(0.05, 0.05, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2qdhl"]
albedo_color = Color(1, 0.764706, 0.294118, 1)
emission_enabled = true
emission = Color(0.568627, 1, 0.313726, 1)
emission_energy_multiplier = 5.0
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_618v8"]
direction = Vector3(0, 0, 1)
initial_velocity_min = 3.0
initial_velocity_max = 5.0
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_gn2fy"]
albedo_color = Color(1, 1, 0.443137, 1)
emission_enabled = true
emission = Color(0.568627, 1, 0.313726, 1)
emission_energy_multiplier = 8.0
[sub_resource type="BoxMesh" id="BoxMesh_5un5e"]
material = SubResource("StandardMaterial3D_gn2fy")
size = Vector3(0.04, 0.04, 0.04)
[node name="Bullet" type="Bullet"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -56304.6)
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.6)
mesh = SubResource("BoxMesh_ibwn0")
surface_material_override/0 = SubResource("StandardMaterial3D_2qdhl")
[node name="RayCast3D" type="RayCast3D" parent="."]
target_position = Vector3(0, 0, -0.6)
collision_mask = 2
collide_with_areas = true
[node name="GPUParticles3D" type="GPUParticles3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.7)
emitting = false
one_shot = true
explosiveness = 1.0
visibility_aabb = AABB(-1.00001, -6.06334, -1.00001, 2.00002, 7.06267, 41.4102)
process_material = SubResource("ParticleProcessMaterial_618v8")
draw_pass_1 = SubResource("BoxMesh_5un5e")
[node name="Timer" type="Timer" parent="."]
wait_time = 10.0
one_shot = true
autostart = true
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]

View File

@@ -0,0 +1,36 @@
[gd_scene load_steps=4 format=3 uid="uid://ciex3x7rhv1bx"]
[ext_resource type="PackedScene" uid="uid://bkskefixbe2cw" path="res://Assets/Models/Weapons/Steampunk Rifle.glb" id="1_0bnv5"]
[sub_resource type="Animation" id="Animation_20uwx"]
resource_name = "Shoot"
length = 0.1
step = 0.01
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Node:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.01, 0.1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, 0, 0.05), Vector3(0, 0, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_113bo"]
_data = {
"Shoot": SubResource("Animation_20uwx")
}
[node name="Steampunk Rifle" instance=ExtResource("1_0bnv5")]
[node name="AnimationPlayer" type="AnimationPlayer" parent="." index="1"]
libraries = {
"": SubResource("AnimationLibrary_113bo")
}
[node name="RayCast3D" type="RayCast3D" parent="." index="2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.6)
target_position = Vector3(0, 0, -1)

19
godot/bullet.tscn Normal file
View File

@@ -0,0 +1,19 @@
[gd_scene load_steps=3 format=3 uid="uid://bt0551kcc5tw4"]
[sub_resource type="BoxMesh" id="BoxMesh_ibwn0"]
size = Vector3(0.05, 0.05, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2qdhl"]
albedo_color = Color(1, 0.764706, 0.294118, 1)
emission_enabled = true
emission = Color(0.568627, 1, 0.313726, 1)
emission_energy_multiplier = 5.0
[node name="Bullet" type="Bullet"]
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("BoxMesh_ibwn0")
surface_material_override/0 = SubResource("StandardMaterial3D_2qdhl")
[node name="RayCast3D" type="RayCast3D" parent="."]
target_position = Vector3(0, 0, -0.6)

View File

@@ -11,7 +11,7 @@ config_version=5
[application] [application]
config/name="Blitz3" config/name="Blitz3"
run/main_scene="res://Scenes/Levels/prototype.tscn" run/main_scene="res://Scenes/Levels/world.tscn"
config/features=PackedStringArray("4.2", "Forward Plus") config/features=PackedStringArray("4.2", "Forward Plus")
config/icon="res://icon.svg" config/icon="res://icon.svg"
@@ -19,7 +19,7 @@ config/icon="res://icon.svg"
move_left={ move_left={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":113,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"echo":false,"script":null)
] ]
} }
move_right={ move_right={
@@ -29,7 +29,7 @@ move_right={
} }
move_forwards={ move_forwards={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":90,"key_label":0,"unicode":122,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"echo":false,"script":null)
] ]
} }
move_backwards={ move_backwards={
@@ -37,7 +37,7 @@ move_backwards={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"echo":false,"script":null)
] ]
} }
run={ sprint={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194325,"key_label":0,"unicode":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194325,"key_label":0,"unicode":0,"echo":false,"script":null)
] ]
@@ -47,8 +47,13 @@ jump={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"echo":false,"script":null)
] ]
} }
switch_camera={ escape={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":84,"key_label":0,"unicode":116,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
shoot={
"deadzone": 0.5,
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(351, 9),"global_position":Vector2(355, 50),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null)
] ]
} }

View File

@@ -0,0 +1,72 @@
#include "BoneCollisionShape.h"
#include <godot_cpp/classes/engine.hpp>
using namespace godot;
namespace blitz {
void BoneCollisionShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_head_damage"), &BoneCollisionShape::get_head_damage);
ClassDB::bind_method(D_METHOD("set_head_damage", "m_HeadDamage"), &BoneCollisionShape::set_head_damage);
ADD_PROPERTY(PropertyInfo(Variant::INT, "m_HeadDamage"), "set_head_damage", "get_head_damage");
ClassDB::bind_method(D_METHOD("get_body_damage"), &BoneCollisionShape::get_body_damage);
ClassDB::bind_method(D_METHOD("set_body_damage", "m_BodyDamage"), &BoneCollisionShape::set_body_damage);
ADD_PROPERTY(PropertyInfo(Variant::INT, "m_BodyDamage"), "set_head_damage", "get_body_damage");
ADD_SIGNAL(MethodInfo("a_ZombieHeadShotHit", PropertyInfo(Variant::INT, "dam")));
ADD_SIGNAL(MethodInfo("a_ZombieBodyShotHit", PropertyInfo(Variant::INT, "dam")));
ClassDB::bind_method(D_METHOD("headshot_hit"), &BoneCollisionShape::headshot_hit);
ClassDB::bind_method(D_METHOD("bodyshot_hit"), &BoneCollisionShape::bodyshot_hit);
}
BoneCollisionShape::BoneCollisionShape() {}
BoneCollisionShape::~BoneCollisionShape() {}
void BoneCollisionShape::_ready() {
#if DEBUG_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
return;
}
#endif
m_Crosshair = Object::cast_to<Crosshair>(
get_parent()->get_parent()->get_parent()->get_parent()->get_parent()->get_parent()->get_parent()->find_child("Crosshair"));
DEV_ASSERT(m_Crosshair);
m_HitMarkers = Object::cast_to<HitMarkers>(
get_parent()->get_parent()->get_parent()->get_parent()->get_parent()->get_parent()->get_parent()->find_child("HitMarkers"));
DEV_ASSERT(m_HitMarkers);
}
void BoneCollisionShape::set_head_damage(int a_D) {
m_HeadDamage = a_D;
}
int BoneCollisionShape::get_head_damage() const {
return m_HeadDamage;
}
void BoneCollisionShape::set_body_damage(int a_D) {
m_BodyDamage = a_D;
}
int BoneCollisionShape::get_body_damage() const {
return m_BodyDamage;
}
void BoneCollisionShape::headshot_hit() {
ERR_PRINT("zombie headshot hit");
m_Crosshair->set_dot_color(Color(1, 0, 0, 1));
m_HitMarkers->hsvisible(true);
emit_signal("a_ZombieHeadShotHit", m_HeadDamage);
}
void BoneCollisionShape::bodyshot_hit() {
ERR_PRINT("zombie body hit");
m_HitMarkers->visible(true);
emit_signal("a_ZombieBodyShotHit", m_BodyDamage);
}
} // namespace blitz

34
src/BoneCollisionShape.h Normal file
View File

@@ -0,0 +1,34 @@
#pragma once
#include "Crosshair.h"
#include "HitMarkers.h"
#include <godot_cpp/classes/area3d.hpp>
namespace blitz {
class BoneCollisionShape : public godot::Area3D {
GDCLASS(BoneCollisionShape, godot::Area3D)
protected:
static void _bind_methods();
public:
BoneCollisionShape();
~BoneCollisionShape();
void _ready();
void headshot_hit();
void bodyshot_hit();
private:
int m_HeadDamage = 2;
int m_BodyDamage = 1;
void set_head_damage(int d);
int get_head_damage() const;
void set_body_damage(int d);
int get_body_damage() const;
Crosshair* m_Crosshair;
HitMarkers* m_HitMarkers;
};
} // namespace blitz

73
src/Bullet.cpp Normal file
View File

@@ -0,0 +1,73 @@
#include "Bullet.h"
#include "BoneCollisionShape.h"
#include <godot_cpp/classes/engine.hpp>
using namespace godot;
namespace blitz {
static constexpr float BULLET_SPEED = 40.0f;
void Bullet::_bind_methods() {
ClassDB::bind_method(D_METHOD("_on_timer_timeout"), &Bullet::_on_timer_timeout);
}
Bullet::Bullet() {}
Bullet::~Bullet() {}
void Bullet::_ready() {
m_Particles = Object::cast_to<GPUParticles3D>(find_child("GPUParticles3D"));
DEV_ASSERT(m_Particles);
m_Ray = Object::cast_to<RayCast3D>(find_child("RayCast3D"));
DEV_ASSERT(m_Ray);
m_Mesh = Object::cast_to<MeshInstance3D>(find_child("MeshInstance3D"));
DEV_ASSERT(m_Mesh);
m_Timer = memnew(Timer);
add_child(m_Timer);
m_Timer->connect("timeout", callable_mp(this, &Bullet::_on_timer_timeout));
#if DEBUG_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
return;
}
#endif
m_Crosshair = Object::cast_to<Crosshair>(get_parent()->find_child("Crosshair"));
DEV_ASSERT(m_Crosshair);
m_HitMarkers = Object::cast_to<HitMarkers>(get_parent()->find_child("HitMarkers"));
DEV_ASSERT(m_HitMarkers);
}
void Bullet::_physics_process(float a_Delta) {
Vector3 movement = Vector3(0, 0, -BULLET_SPEED) * a_Delta;
set_position(get_transform().xform(movement));
if (m_Ray->is_colliding()) {
m_Mesh->set_visible(false);
m_Particles->set_emitting(true);
m_Ray->set_enabled(false);
Object* collider = m_Ray->get_collider();
if (!collider)
return;
auto* area_collider = Object::cast_to<BoneCollisionShape>(collider);
if (!(area_collider && area_collider->is_in_group("enemy")))
return;
const StringName& area_name = area_collider->get_name();
area_collider->call(area_name.match("HeadArea3D") ? "headshot_hit" : "bodyshot_hit");
m_Timer->set_wait_time(1.0);
m_Timer->start();
}
}
void Bullet::_on_timer_timeout() {
m_Crosshair->set_dot_color(Color(1, 1, 1, 1));
m_HitMarkers->visible();
m_HitMarkers->hsvisible();
queue_free();
}
} // namespace blitz

35
src/Bullet.h Normal file
View File

@@ -0,0 +1,35 @@
#pragma once
#include "Crosshair.h"
#include "HitMarkers.h"
#include <godot_cpp/classes/gpu_particles3d.hpp>
#include <godot_cpp/classes/mesh_instance3d.hpp>
#include <godot_cpp/classes/node3d.hpp>
#include <godot_cpp/classes/ray_cast3d.hpp>
#include <godot_cpp/classes/timer.hpp>
namespace blitz {
class Bullet : public godot::Node3D {
GDCLASS(Bullet, godot::Node3D)
protected:
static void _bind_methods();
public:
Bullet();
~Bullet();
void _ready();
void _physics_process(float delta);
private:
godot::GPUParticles3D* m_Particles;
godot::RayCast3D* m_Ray;
godot::MeshInstance3D* m_Mesh;
godot::Timer* m_Timer;
Crosshair* m_Crosshair;
HitMarkers* m_HitMarkers;
void _on_timer_timeout();
};
} // namespace blitz

70
src/Crosshair.cpp Normal file
View File

@@ -0,0 +1,70 @@
#include "Crosshair.h"
using namespace godot;
namespace blitz {
void Crosshair::_bind_methods() {}
Crosshair::Crosshair() :
m_DotRadius(1.0f),
m_DotColor(Color(1, 1, 1, 1)),
m_CrosshairSpeed(0.25f),
m_CrosshairDistance(2.0f),
m_Origin(Vector3(0, 0, 0)),
m_Pos(Vector2(0, 0)) {}
Crosshair::~Crosshair() {}
void Crosshair::_ready() {
// Catch the parent node directly without SubViewport problem in the editor thx to "recursivity" (if we go up the tree one more
// notch its bugging)
Node* root_node = get_parent();
while (root_node != nullptr && !root_node->is_class("FirstPersonPlayer")) {
root_node = root_node->get_parent();
}
if (root_node != nullptr && root_node->is_class("FirstPersonPlayer")) {
m_Player = Object::cast_to<FirstPersonPlayer>(root_node);
DEV_ASSERT(m_Player);
} else {
ERR_PRINT("FirstPersonPlayer not found in parent hierarchy.");
}
m_CrosshairLines = {Object::cast_to<Line2D>(find_child("Top")), Object::cast_to<Line2D>(find_child("Right")),
Object::cast_to<Line2D>(find_child("Bottom")), Object::cast_to<Line2D>(find_child("Left"))};
for (size_t i = 0; i < m_CrosshairLines.size(); i++) {
DEV_ASSERT(m_CrosshairLines[i]);
}
queue_redraw();
}
void Crosshair::_process(float a_Delta) {
adjust_crosshair_lines();
}
void Crosshair::_draw() {
draw_circle(Vector2(20, 20), m_DotRadius, m_DotColor);
}
void Crosshair::adjust_crosshair_lines() {
Vector3 vel = m_Player->get_real_velocity();
float speed = m_Origin.distance_to(vel);
m_CrosshairLines[0]->set_position(
m_CrosshairLines[0]->get_position().lerp(m_Pos + Vector2(0, -speed * m_CrosshairDistance), m_CrosshairSpeed));
m_CrosshairLines[1]->set_position(
m_CrosshairLines[1]->get_position().lerp(m_Pos + Vector2(speed * m_CrosshairDistance, 0), m_CrosshairSpeed));
m_CrosshairLines[2]->set_position(
m_CrosshairLines[2]->get_position().lerp(m_Pos + Vector2(0, speed * m_CrosshairDistance), m_CrosshairSpeed));
m_CrosshairLines[3]->set_position(
m_CrosshairLines[3]->get_position().lerp(m_Pos + Vector2(-speed * m_CrosshairDistance, 0), m_CrosshairSpeed));
}
void Crosshair::set_dot_color(Color a_Color) {
m_DotColor = a_Color;
queue_redraw();
}
} // namespace blitz

35
src/Crosshair.h Normal file
View File

@@ -0,0 +1,35 @@
#pragma once
#include "FirstPersonPlayer.h"
#include <godot_cpp/classes/center_container.hpp>
#include <godot_cpp/classes/line2d.hpp>
namespace blitz {
class Crosshair : public godot::CenterContainer {
GDCLASS(Crosshair, godot::CenterContainer)
protected:
static void _bind_methods();
public:
Crosshair();
~Crosshair();
void _ready();
void _process(float delta);
void _draw();
void set_dot_color(godot::Color col);
private:
godot::Color m_DotColor;
float m_DotRadius;
std::array<godot::Line2D*, 4> m_CrosshairLines;
FirstPersonPlayer* m_Player;
float m_CrosshairSpeed;
float m_CrosshairDistance;
godot::Vector3 m_Origin;
godot::Vector2 m_Pos;
void adjust_crosshair_lines();
};
} // namespace blitz

169
src/FirstPersonPlayer.cpp Normal file
View File

@@ -0,0 +1,169 @@
#include "FirstPersonPlayer.h"
#include <godot_cpp/classes/engine.hpp>
#include <godot_cpp/classes/input.hpp>
#include <godot_cpp/classes/input_event_mouse_motion.hpp>
#include <godot_cpp/classes/input_map.hpp>
#include <godot_cpp/classes/resource_loader.hpp>
#include <godot_cpp/core/math.hpp>
#include <godot_cpp/variant/signal.hpp>
using namespace godot;
namespace blitz {
static constexpr float WALK_SPEED = 5.0f;
static constexpr float SPRINT_SPEED = 7.0f;
static constexpr float JUMP_VELOCITY = 4.5f;
static constexpr float GRAVITY = 9.81f;
static constexpr float SENSITIVITY = 0.003f;
static constexpr float HIT_STAGGER = 8.0f;
static constexpr float BOB_FREQ = 2.0f;
static constexpr float BOB_AMP = 0.08f;
static constexpr float AIR_MOVEMENT = 3.0f;
static constexpr float GROUND_FRICTION = 7.0f;
static constexpr float BASE_FOV = 75.0f;
static constexpr float FOV_CHANGE = 1.5f;
static constexpr float FOV_TRANSITION = 8.0f;
static constexpr float MIN_FOV_VELOCITY = 0.5;
static constexpr float MAX_FOV_VELOCITY = SPRINT_SPEED * 2.0f;
void FirstPersonPlayer::_bind_methods() {
ADD_SIGNAL(MethodInfo("a_PlayerHit"));
}
FirstPersonPlayer::FirstPersonPlayer() : m_BobTime(0) {}
FirstPersonPlayer::~FirstPersonPlayer() {}
void FirstPersonPlayer::_ready() {
InputMap::get_singleton()->load_from_project_settings();
if (!Engine::get_singleton()->is_editor_hint()) {
Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_CAPTURED);
}
m_Head = Object::cast_to<Node3D>(find_child("Head"));
DEV_ASSERT(m_Head);
m_Camera = Object::cast_to<Camera3D>(m_Head->find_child("Camera"));
DEV_ASSERT(m_Camera);
m_WeaponAnimation = Object::cast_to<AnimationPlayer>(find_child("AnimationPlayer"));
DEV_ASSERT(m_WeaponAnimation);
m_GunBarrel = Object::cast_to<RayCast3D>(find_child("RayCast3D"));
DEV_ASSERT(m_GunBarrel);
m_BulletScene = ResourceLoader::get_singleton()->load("res://Scenes/Weapons/bullet.tscn");
if (!m_BulletScene.is_valid()) {
ERR_PRINT("Failed to load bullet scene.");
}
}
void FirstPersonPlayer::_unhandled_input(const godot::Ref<godot::InputEvent>& a_Event) {
auto* event = Object::cast_to<InputEventMouseMotion>(a_Event.ptr());
if (event)
UpdateCamera(*event);
// TODO: remove
if (Input::get_singleton()->is_action_just_pressed("escape")) {
Input::MouseMode current = Input::get_singleton()->get_mouse_mode();
Input::get_singleton()->set_mouse_mode(
(current == Input::MOUSE_MODE_CAPTURED) ? Input::MOUSE_MODE_VISIBLE : Input::MOUSE_MODE_CAPTURED);
}
}
void FirstPersonPlayer::_physics_process(float a_Delta) {
#if DEBUG_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
return;
}
#endif
auto* Input = Input::get_singleton();
if (!is_on_floor())
set_velocity(get_velocity() - Vector3{0, GRAVITY * a_Delta, 0});
if (Input->is_action_pressed("jump") && is_on_floor())
set_velocity({get_velocity().x, JUMP_VELOCITY, get_velocity().z});
m_Speed = Input->is_action_pressed("sprint") ? SPRINT_SPEED : WALK_SPEED;
UpdatePosition(a_Delta);
UpdateFOV(a_Delta);
UpdateBobbing(a_Delta);
if (Input->is_action_pressed("shoot")) {
if (!m_WeaponAnimation->is_playing()) {
m_WeaponAnimation->play("Shoot");
m_BulletInstance = m_BulletScene->instantiate();
m_BulletInstance->set("position", m_GunBarrel->get_global_transform().origin);
m_BulletInstance->set("rotation", m_GunBarrel->get_global_transform().basis.get_euler());
get_parent()->add_child(m_BulletInstance);
}
}
move_and_slide();
}
void FirstPersonPlayer::UpdateBobbing(float a_Delta) {
m_BobTime += a_Delta * get_velocity().length() * is_on_floor();
Vector3 newPos{static_cast<float>(Math::cos(m_BobTime * BOB_FREQ / 2.0) * BOB_AMP),
static_cast<float>(Math::sin(m_BobTime * BOB_FREQ) * BOB_AMP), 0};
m_Camera->set_transform({m_Camera->get_transform().basis, newPos});
}
void FirstPersonPlayer::UpdateCamera(const InputEventMouseMotion& a_Event) {
m_Head->rotate_y(-a_Event.get_relative().x * SENSITIVITY);
m_Camera->rotate_x(-a_Event.get_relative().y * SENSITIVITY);
float rotationX = m_Camera->get_rotation().x;
CLAMP(rotationX, Math::deg_to_rad(-40.0), Math::deg_to_rad(60.0));
m_Camera->set_rotation({rotationX, get_rotation().y, get_rotation().z});
}
void FirstPersonPlayer::UpdatePosition(float delta) {
auto* Input = Input::get_singleton();
Vector2 inputDirection = Input->get_vector("move_left", "move_right", "move_forwards", "move_backwards");
Vector3 direction = (m_Head->get_transform().basis.xform(Vector3(inputDirection.x, 0, inputDirection.y))).normalized();
if (is_on_floor()) {
if (!direction.is_zero_approx()) {
set_velocity({direction.x * m_Speed, get_velocity().y, direction.z * m_Speed});
} else {
set_velocity({Math::lerp(static_cast<float>(get_velocity().x), static_cast<float>(direction.x * m_Speed),
static_cast<float>(delta * GROUND_FRICTION)),
get_velocity().y,
Math::lerp(static_cast<float>(get_velocity().z), static_cast<float>(direction.z * m_Speed),
static_cast<float>(delta * GROUND_FRICTION))});
}
} else {
set_velocity({Math::lerp(static_cast<float>(get_velocity().x), static_cast<float>(direction.x * m_Speed),
static_cast<float>(delta * AIR_MOVEMENT)),
get_velocity().y,
Math::lerp(static_cast<float>(get_velocity().z), static_cast<float>(direction.z * m_Speed),
static_cast<float>(delta * AIR_MOVEMENT))});
}
}
void FirstPersonPlayer::UpdateFOV(float a_Delta) {
float velocityClamped = Math::clamp(get_velocity().length(), MIN_FOV_VELOCITY, MAX_FOV_VELOCITY);
float targetFOV = BASE_FOV + FOV_CHANGE * velocityClamped;
m_Camera->set_fov(Math::lerp(m_Camera->get_fov(), targetFOV, a_Delta * FOV_TRANSITION));
}
void FirstPersonPlayer::hit(Vector3 a_Dir) {
emit_signal("a_PlayerHit");
this->set_velocity(a_Dir * HIT_STAGGER);
}
} // namespace blitz

46
src/FirstPersonPlayer.h Normal file
View File

@@ -0,0 +1,46 @@
#pragma once
#include <godot_cpp/classes/animation_player.hpp>
#include <godot_cpp/classes/camera3d.hpp>
#include <godot_cpp/classes/character_body3d.hpp>
#include <godot_cpp/classes/input_event_mouse_motion.hpp>
#include <godot_cpp/classes/node3d.hpp>
#include <godot_cpp/classes/packed_scene.hpp>
#include <godot_cpp/classes/ray_cast3d.hpp>
#include <godot_cpp/classes/ref.hpp>
namespace blitz {
class FirstPersonPlayer : public godot::CharacterBody3D {
GDCLASS(FirstPersonPlayer, godot::CharacterBody3D)
protected:
static void _bind_methods();
public:
FirstPersonPlayer();
~FirstPersonPlayer();
// Godot overrides
void _unhandled_input(const godot::Ref<godot::InputEvent>&);
void _physics_process(float delta);
void _ready();
void hit(godot::Vector3 dir);
private:
godot::Camera3D* m_Camera;
godot::Node3D* m_Head;
godot::AnimationPlayer* m_WeaponAnimation;
godot::RayCast3D* m_GunBarrel;
godot::Node* m_BulletInstance;
godot::Ref<godot::PackedScene> m_BulletScene;
float m_BobTime;
float m_Speed;
void UpdateBobbing(float delta);
void UpdateFOV(float delta);
void UpdateCamera(const godot::InputEventMouseMotion&);
void UpdatePosition(float delta);
};
} // namespace blitz

37
src/HitMarkers.cpp Normal file
View File

@@ -0,0 +1,37 @@
#include "HitMarkers.h"
using namespace godot;
namespace blitz {
void HitMarkers::_bind_methods() {}
HitMarkers::HitMarkers() {}
HitMarkers::~HitMarkers() {}
void HitMarkers::_ready() {
m_HitMarkerLines = {Object::cast_to<Line2D>(find_child("TopRight")), Object::cast_to<Line2D>(find_child("BottomRight")),
Object::cast_to<Line2D>(find_child("BottomLeft")), Object::cast_to<Line2D>(find_child("TopLeft"))};
for (size_t i = 0; i < m_HitMarkerLines.size(); i++) {
DEV_ASSERT(m_HitMarkerLines[i]);
}
m_HitMarkerHSLines = {Object::cast_to<Line2D>(find_child("TopRightHS")), Object::cast_to<Line2D>(find_child("BottomRightHS")),
Object::cast_to<Line2D>(find_child("BottomLeftHS")), Object::cast_to<Line2D>(find_child("TopLeftHS"))};
for (size_t i = 0; i < m_HitMarkerHSLines.size(); i++) {
DEV_ASSERT(m_HitMarkerHSLines[i]);
}
this->visible();
}
void HitMarkers::visible(bool a_Bool) {
for (size_t i = 0; i < m_HitMarkerLines.size(); i++) {
m_HitMarkerLines[i]->set_visible(a_Bool);
}
}
void HitMarkers::hsvisible(bool a_Bool) {
for (size_t i = 0; i < m_HitMarkerHSLines.size(); i++) {
m_HitMarkerHSLines[i]->set_visible(a_Bool);
}
}
} // namespace blitz

25
src/HitMarkers.h Normal file
View File

@@ -0,0 +1,25 @@
#pragma once
#include <godot_cpp/classes/center_container.hpp>
#include <godot_cpp/classes/line2d.hpp>
namespace blitz {
class HitMarkers : public godot::CenterContainer {
GDCLASS(HitMarkers, godot::CenterContainer)
protected:
static void _bind_methods();
public:
HitMarkers();
~HitMarkers();
void _ready();
void visible(bool visiblity = false);
void hsvisible(bool visiblity = false);
private:
std::array<godot::Line2D*, 4> m_HitMarkerLines;
std::array<godot::Line2D*, 4> m_HitMarkerHSLines;
};
} // namespace blitz

View File

@@ -28,8 +28,6 @@ SpringArmPivot::~SpringArmPivot() {}
void SpringArmPivot::_ready() { void SpringArmPivot::_ready() {
m_SpringArm = Object::cast_to<godot::SpringArm3D>(get_child(0)); m_SpringArm = Object::cast_to<godot::SpringArm3D>(get_child(0));
m_Camera = Object::cast_to<godot::Camera3D>(m_SpringArm->get_child(0)); m_Camera = Object::cast_to<godot::Camera3D>(m_SpringArm->get_child(0));
m_CameraFPS = get_parent()->get_node<godot::Camera3D>("Mesh/Armature/Skeleton3D/BoneAttachment3D/CameraFPS");
DEV_ASSERT(m_SpringArm); DEV_ASSERT(m_SpringArm);
DEV_ASSERT(m_Camera); DEV_ASSERT(m_Camera);
if (!godot::Engine::get_singleton()->is_editor_hint()) { if (!godot::Engine::get_singleton()->is_editor_hint()) {
@@ -42,22 +40,11 @@ void SpringArmPivot::_unhandled_input(const godot::Ref<godot::InputEvent>& p_eve
if (event) { if (event) {
rotate_y(-event->get_relative().x * 0.005); rotate_y(-event->get_relative().x * 0.005);
m_SpringArm->rotate_x(-event->get_relative().y * 0.005); m_SpringArm->rotate_x(-event->get_relative().y * 0.005);
m_CameraFPS->rotate_x(event->get_relative().y * 0.005);
godot::Vector3 rotationClamped = m_SpringArm->get_rotation(); godot::Vector3 rotationClamped = m_SpringArm->get_rotation();
rotationClamped.x = godot::UtilityFunctions::clamp(rotationClamped.x, -Math_PI / 4, Math_PI / 4); rotationClamped.x = godot::UtilityFunctions::clamp(rotationClamped.x, -Math_PI / 4, Math_PI / 4);
m_SpringArm->set_rotation(rotationClamped); m_SpringArm->set_rotation(rotationClamped);
} }
auto* keyboardevent = Object::cast_to<godot::InputEvent>(p_event.ptr());
if (keyboardevent->is_action_pressed("switch_camera")) {
if (m_Camera->is_current()) {
m_Camera->clear_current();
} else {
m_Camera->make_current();
}
}
} }
void SpringArmPivot::_physics_process(float delta) { void SpringArmPivot::_physics_process(float delta) {

View File

@@ -1,9 +1,9 @@
#pragma once #pragma once
#include <godot_cpp/classes/camera3d.hpp>
#include <godot_cpp/classes/input_event.hpp> #include <godot_cpp/classes/input_event.hpp>
#include <godot_cpp/classes/node3d.hpp> #include <godot_cpp/classes/node3d.hpp>
#include <godot_cpp/classes/spring_arm3d.hpp> #include <godot_cpp/classes/spring_arm3d.hpp>
#include <godot_cpp/classes/camera3d.hpp>
namespace blitz { namespace blitz {
class SpringArmPivot : public godot::Node3D { class SpringArmPivot : public godot::Node3D {
@@ -32,7 +32,6 @@ class SpringArmPivot : public godot::Node3D {
private: private:
godot::SpringArm3D* m_SpringArm; godot::SpringArm3D* m_SpringArm;
godot::Camera3D* m_Camera; godot::Camera3D* m_Camera;
godot::Camera3D* m_CameraFPS;
bool m_DynamicFOV = false; bool m_DynamicFOV = false;
}; };

87
src/World.cpp Normal file
View File

@@ -0,0 +1,87 @@
#include "World.h"
#include "FirstPersonPlayer.h"
#include <godot_cpp/classes/engine.hpp>
#include <godot_cpp/classes/resource_loader.hpp>
#include <godot_cpp/variant/utility_functions.hpp>
using namespace godot;
namespace blitz {
void World::_bind_methods() {
ClassDB::bind_method(D_METHOD("_on_first_person_player_hit"), &World::_on_first_person_player_hit);
ClassDB::bind_method(D_METHOD("_on_timer_timeout"), &World::_on_timer_timeout);
ClassDB::bind_method(D_METHOD("_on_zombie_spawn_timer_timeout"), &World::_on_zombie_spawn_timer_timeout);
}
World::World() {}
World::~World() {}
void World::_ready() {
FirstPersonPlayer* player = Object::cast_to<FirstPersonPlayer>(find_child("FirstPersonPlayer"));
DEV_ASSERT(player);
if (player) {
player->connect("a_PlayerHit", callable_mp(this, &World::_on_first_person_player_hit));
}
m_RedRect = Object::cast_to<ColorRect>(find_child("HitRect"));
DEV_ASSERT(m_RedRect);
m_Timer = memnew(Timer);
add_child(m_Timer);
m_Timer->connect("timeout", callable_mp(this, &World::_on_timer_timeout));
m_ZombieSpawnTimer = memnew(Timer);
add_child(m_ZombieSpawnTimer);
m_ZombieSpawnTimer->connect("timeout", callable_mp(this, &World::_on_zombie_spawn_timer_timeout));
m_Spawns = Object::cast_to<Node3D>(find_child("Spawns"));
DEV_ASSERT(m_Spawns);
m_NavigationRegion = Object::cast_to<NavigationRegion3D>(find_child("NavigationRegion3D"));
DEV_ASSERT(m_NavigationRegion);
m_ZombieScene = ResourceLoader::get_singleton()->load("res://Scenes/Characters/zombie.tscn");
if (!m_ZombieScene.is_valid()) {
ERR_PRINT("Failed to load zombie scene.");
}
m_RandomId.instantiate();
m_RandomId->randomize();
m_ZombieSpawnTimer->start();
}
void World::_on_first_person_player_hit() {
#if DEBUG_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
return;
}
#endif
UtilityFunctions::print("Player hit detected in World.");
m_RedRect->set_visible(true);
m_Timer->set_wait_time(0.2);
m_Timer->start();
}
void World::_on_timer_timeout() {
m_RedRect->set_visible(false);
}
Node* World::get_random_child(Node* a_ParentNode) {
m_ZombieSpawnTimer->set_wait_time(4.0);
if (!a_ParentNode || a_ParentNode->get_child_count() == 0) {
return nullptr;
}
int32_t id = m_RandomId->randi() % a_ParentNode->get_child_count();
return a_ParentNode->get_child(id);
}
void World::_on_zombie_spawn_timer_timeout() {
#if DEBUG_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
return;
}
#endif
auto spawns = Object::cast_to<Node3D>(World::get_random_child(m_Spawns));
auto spawn_points = spawns->get_global_position();
m_ZombieInstance = Object::cast_to<Zombie>(m_ZombieScene->instantiate());
DEV_ASSERT(m_ZombieInstance);
m_ZombieInstance->set_position(spawn_points);
m_NavigationRegion->add_child(m_ZombieInstance);
}
} // namespace blitz

40
src/World.h Normal file
View File

@@ -0,0 +1,40 @@
#pragma once
#include "Zombie.h"
#include <godot_cpp/classes/color_rect.hpp>
#include <godot_cpp/classes/navigation_region3d.hpp>
#include <godot_cpp/classes/packed_scene.hpp>
#include <godot_cpp/classes/random_number_generator.hpp>
#include <godot_cpp/classes/ref.hpp>
#include <godot_cpp/classes/timer.hpp>
namespace blitz {
class World : public godot::Node3D {
GDCLASS(World, godot::Node3D);
protected:
static void _bind_methods();
public:
World();
~World();
void _ready();
private:
godot::ColorRect* m_RedRect;
godot::Timer* m_Timer;
godot::Timer* m_ZombieSpawnTimer;
godot::Node3D* m_Spawns;
godot::NavigationRegion3D* m_NavigationRegion;
Zombie* m_ZombieInstance;
godot::Ref<godot::PackedScene> m_ZombieScene;
godot::Ref<godot::RandomNumberGenerator> m_RandomId;
void _on_timer_timeout();
void _on_zombie_spawn_timer_timeout();
void _on_first_person_player_hit();
Node* get_random_child(Node* parent_node);
};
} // namespace blitz

134
src/Zombie.cpp Normal file
View File

@@ -0,0 +1,134 @@
#include "Zombie.h"
#include <godot_cpp/classes/engine.hpp>
#include <godot_cpp/classes/scene_tree.hpp>
#include <godot_cpp/classes/window.hpp>
#include <godot_cpp/core/math.hpp>
using namespace godot;
namespace blitz {
static constexpr float SPEED = 2.0f;
static constexpr float ATTACK_RANGE = 2.0f;
void Zombie::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_m_PlayerPath", "m_PlayerPath"), &Zombie::set_m_PlayerPath);
ClassDB::bind_method(D_METHOD("get_m_PlayerPath"), &Zombie::get_m_PlayerPath);
ClassDB::bind_method(D_METHOD("hit_finished"), &Zombie::hit_finished);
ClassDB::bind_method(D_METHOD("_on_area_3d_a_zombie_head_shot_hit", "m_Health"), &Zombie::_on_area_3d_a_zombie_head_shot_hit);
ClassDB::bind_method(D_METHOD("_on_area_3d_a_zombie_body_shot_hit", "m_Health"), &Zombie::_on_area_3d_a_zombie_body_shot_hit);
ClassDB::bind_method(D_METHOD("_on_timer_timeout"), &Zombie::_on_timer_timeout);
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "m_PlayerPath"), "set_m_PlayerPath", "get_m_PlayerPath");
}
Zombie::Zombie() {}
Zombie::~Zombie() {}
void Zombie::_ready() {
#if DEBUG_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
return;
}
#endif
godot::Node* scene_root = Object::cast_to<godot::Node>(get_tree()->get_root()->get_child(0));
if (scene_root) {
m_Player = Object::cast_to<FirstPersonPlayer>(scene_root->find_child("FirstPersonPlayer", true));
DEV_ASSERT(m_Player);
} else {
ERR_PRINT("Scene root not found or invalid.");
}
m_NavigationAgent = Object::cast_to<NavigationAgent3D>(find_child("NavigationAgent3D"));
DEV_ASSERT(m_NavigationAgent);
m_AnimationTree = Object::cast_to<AnimationTree>(find_child("AnimationTree"));
DEV_ASSERT(m_AnimationTree);
m_StateMachine = Object::cast_to<AnimationNodeStateMachinePlayback>(m_AnimationTree->get("parameters/playback"));
DEV_ASSERT(m_StateMachine);
this->set_velocity(Vector3(0, 0, 0));
m_HeadCollision = Object::cast_to<BoneCollisionShape>(find_child("HeadArea3D"));
DEV_ASSERT(m_HeadCollision);
m_HeadCollision->connect("a_ZombieHeadShotHit", Callable(this, "_on_area_3d_a_zombie_head_shot_hit"));
connect_collision_shapes(m_BodyPartsCollision);
m_Timer = memnew(Timer);
add_child(m_Timer);
m_Timer->connect("timeout", callable_mp(this, &Zombie::_on_timer_timeout));
}
void Zombie::_process(float a_Delta) {
#if DEBUG_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
return;
}
#endif
if (m_StateMachine->get_current_node().match("Run")) {
m_NavigationAgent->set_target_position(m_Player->get_global_position());
m_Velocity = (m_NavigationAgent->get_next_path_position() - this->get_global_position()).normalized() * SPEED;
this->set_velocity(m_Velocity);
look_at(Vector3(this->get_global_position().x + this->get_velocity().x, this->get_global_position().y,
this->get_global_position().z + this->get_velocity().z));
} else if (m_StateMachine->get_current_node().match("Attack")) {
this->set_velocity(Vector3(0, 0, 0));
look_at(Vector3(m_Player->get_global_position().x + this->get_velocity().x, this->get_global_position().y,
m_Player->get_global_position().z + this->get_velocity().z));
}
m_AnimationTree->set("parameters/conditions/run", !_target_in_range());
m_AnimationTree->set("parameters/conditions/attack", _target_in_range());
move_and_slide();
}
bool Zombie::_target_in_range() {
return this->get_global_position().distance_to(m_Player->get_global_position()) < ATTACK_RANGE;
}
void Zombie::set_m_PlayerPath(const NodePath& path) {
m_PlayerPath = path;
}
NodePath Zombie::get_m_PlayerPath() const {
return m_PlayerPath;
}
void Zombie::hit_finished() {
if (this->get_global_position().distance_to(m_Player->get_global_position()) < (ATTACK_RANGE + 1.0)) {
Vector3 dir = this->get_global_position().direction_to(m_Player->get_global_position());
m_Player->hit(dir);
}
}
void Zombie::apply_damage(int dam) {
m_Health -= dam;
if (m_Health <= 0) {
m_AnimationTree->set("parameters/conditions/die", true);
this->set_velocity(Vector3(0, 0, 0));
m_Timer->set_wait_time(4.0);
m_Timer->start();
}
}
void Zombie::_on_area_3d_a_zombie_head_shot_hit(int dam) {
apply_damage(dam);
}
void Zombie::_on_area_3d_a_zombie_body_shot_hit(int dam) {
apply_damage(dam);
}
void Zombie::connect_collision_shapes(const std::vector<StringName>& body_parts) {
for (const StringName& part : body_parts) {
StringName area_name = String(part) + "Area3D";
BoneCollisionShape* collision_shape = Object::cast_to<BoneCollisionShape>(find_child(area_name));
DEV_ASSERT(collision_shape);
collision_shape->connect("a_ZombieBodyShotHit", Callable(this, "_on_area_3d_a_zombie_body_shot_hit"));
}
}
void Zombie::_on_timer_timeout() {
queue_free();
}
} // namespace blitz

51
src/Zombie.h Normal file
View File

@@ -0,0 +1,51 @@
#pragma once
#include "BoneCollisionShape.h"
#include "FirstPersonPlayer.h"
#include <godot_cpp/classes/animation_node_state_machine_playback.hpp>
#include <godot_cpp/classes/animation_tree.hpp>
#include <godot_cpp/classes/character_body3d.hpp>
#include <godot_cpp/classes/navigation_agent3d.hpp>
#include <godot_cpp/variant/node_path.hpp>
#include <godot_cpp/variant/string_name.hpp>
#include <godot_cpp/classes/timer.hpp>
namespace blitz {
class Zombie : public godot::CharacterBody3D {
GDCLASS(Zombie, godot::CharacterBody3D)
protected:
static void _bind_methods();
public:
Zombie();
~Zombie();
void _ready();
void _process(float delta);
bool _target_in_range();
void _on_area_3d_a_zombie_head_shot_hit(int dam);
void _on_area_3d_a_zombie_body_shot_hit(int dam);
private:
godot::NavigationAgent3D* m_NavigationAgent;
FirstPersonPlayer* m_Player;
godot::NodePath m_PlayerPath;
godot::Vector3 m_Velocity;
godot::AnimationTree* m_AnimationTree;
godot::AnimationNodeStateMachinePlayback* m_StateMachine;
BoneCollisionShape* m_HeadCollision;
std::vector<godot::StringName> m_BodyPartsCollision = {"Neck", "Spine", "Hips", "LeftArm", "LeftForearm", "LeftHand", "RightArm",
"RightForearm", "RightHand", "LeftUpLeg", "RightUpLeg", "LeftLeg", "RightLeg", "LeftFoot", "RightFoot"};
int m_Health = 6;
godot::Timer* m_Timer;
void set_m_PlayerPath(const godot::NodePath& path);
godot::NodePath get_m_PlayerPath() const;
void hit_finished();
void apply_damage(int dam);
void connect_collision_shapes(const std::vector<godot::StringName>& body_parts);
void _on_timer_timeout();
};
} // namespace blitz

View File

@@ -1,7 +1,14 @@
#include "register_types.h" #include "register_types.h"
#include "BoneCollisionShape.h"
#include "Bullet.h"
#include "Crosshair.h"
#include "FirstPersonPlayer.h"
#include "HitMarkers.h"
#include "Player.h" #include "Player.h"
#include "SpringArmPivot.h" #include "SpringArmPivot.h"
#include "World.h"
#include "Zombie.h"
#include <gdextension_interface.h> #include <gdextension_interface.h>
#include <godot_cpp/core/defs.hpp> #include <godot_cpp/core/defs.hpp>
@@ -16,6 +23,13 @@ void initialize_example_module(ModuleInitializationLevel p_level) {
ClassDB::register_class<blitz::Player>(); ClassDB::register_class<blitz::Player>();
ClassDB::register_class<blitz::SpringArmPivot>(); ClassDB::register_class<blitz::SpringArmPivot>();
ClassDB::register_class<blitz::FirstPersonPlayer>();
ClassDB::register_class<blitz::Bullet>();
ClassDB::register_class<blitz::Zombie>();
ClassDB::register_class<blitz::BoneCollisionShape>();
ClassDB::register_class<blitz::World>();
ClassDB::register_class<blitz::Crosshair>();
ClassDB::register_class<blitz::HitMarkers>();
} }
void uninitialize_example_module(ModuleInitializationLevel p_level) { void uninitialize_example_module(ModuleInitializationLevel p_level) {
@@ -24,9 +38,8 @@ void uninitialize_example_module(ModuleInitializationLevel p_level) {
} }
} }
extern "C" extern "C" GDExtensionBool GDE_EXPORT library_init(GDExtensionInterfaceGetProcAddress p_get_proc,
GDExtensionBool GDE_EXPORT library_init(GDExtensionInterfaceGetProcAddress p_get_proc, const GDExtensionClassLibraryPtr p_library, const GDExtensionClassLibraryPtr p_library, GDExtensionInitialization* r_initialization) {
GDExtensionInitialization* r_initialization) {
godot::GDExtensionBinding::InitObject init_obj(p_get_proc, p_library, r_initialization); godot::GDExtensionBinding::InitObject init_obj(p_get_proc, p_library, r_initialization);
init_obj.register_initializer(initialize_example_module); init_obj.register_initializer(initialize_example_module);

View File

@@ -41,8 +41,9 @@ target(PROJECT_NAME)
on_run( on_run(
(function(godot_project_folder) (function(godot_project_folder)
return function(target) return function(target)
os.execv("echo", {"godot --path", godot_project_folder}) local cmd = format("godot --path %s", godot_project_folder)
os.exec("godot --path " .. godot_project_folder) os.execv("echo", {cmd})
os.exec(cmd)
end end
end)(GODOT_PROJECT_FOLDER) end)(GODOT_PROJECT_FOLDER)
) )

View File

@@ -6,7 +6,7 @@
-- target_platform: the target platform, like "Windows Desktop" -- target_platform: the target platform, like "Windows Desktop"
-- name: the export execute name, it will be endswith ".exe" on windows -- name: the export execute name, it will be endswith ".exe" on windows
task("export") task("export")
on_run((function(godot_project_folder, publish_folder, project_name) on_run((function(godot_project_folder, publish_folder, project_name)
return function(target_platform) return function(target_platform)
local name = godot_project_folder local name = godot_project_folder
@@ -37,8 +37,10 @@ task("export")
local export_path = path.absolute(path.join(publish_folder, project_name)) local export_path = path.absolute(path.join(publish_folder, project_name))
os.execv("echo", {"godot", godot_project_file, export_mode, target_platform, export_path}) local cmd = format("godot %s --headless --%s %s %s", godot_project_file, export_mode, "\"" .. target_platform .. "\"", export_path)
os.exec("godot %s --headless --%s %s %s", godot_project_file, export_mode, "\"" .. target_platform .. "\"", export_path)
os.execv("echo", {cmd})
os.exec(cmd)
end end
end)(GODOT_PROJECT_FOLDER, PUBLISH_FOLDER, PROJECT_NAME)) end)(GODOT_PROJECT_FOLDER, PUBLISH_FOLDER, PROJECT_NAME))
@@ -202,3 +204,22 @@ android.release.arm64 = "res://lib/libProjectName.android_release_arm64.so"
description = "Generate gdextension file", description = "Generate gdextension file",
} }
task_end() task_end()
task("import-assets")
on_run((function(godot_project_folder, project_name)
return function ()
local godot_project_file = path.join(godot_project_folder, "project.godot")
local cmd = format("godot --headless --import %s", godot_project_file)
os.execv("echo", {cmd})
os.exec(cmd)
end
end)(GODOT_PROJECT_FOLDER, PROJECT_NAME))
set_menu {
usage = "xmake import-assets",
description = "Import project assets",
}
task_end()