Added inertia and acceleration

This commit is contained in:
leca 2024-02-28 09:27:41 +03:00
commit fcf3740f58
4 changed files with 335 additions and 72 deletions

View File

@ -48,9 +48,10 @@ text = "Closed source
[node name="Select_CS" type="Button" parent="Choose_team/CS"]
layout_mode = 0
offset_left = 121.0
offset_right = 175.0
offset_bottom = 31.0
offset_left = 129.0
offset_top = -77.0
offset_right = 183.0
offset_bottom = -46.0
text = "Select
"
script = ExtResource("1_nua8c")
@ -75,8 +76,9 @@ text = "Open source
[node name="Select_OS" type="Button" parent="Choose_team/OS"]
layout_mode = 0
offset_left = -129.0
offset_top = -77.0
offset_right = -75.0
offset_bottom = 31.0
offset_bottom = -46.0
text = "Select
"
script = ExtResource("1_nua8c")
@ -100,9 +102,9 @@ text = "Spectator"
[node name="Select_SP" type="Button" parent="Choose_team/Spectator"]
layout_mode = 0
offset_left = -21.0
offset_top = 56.0
offset_top = 23.0
offset_right = 33.0
offset_bottom = 87.0
offset_bottom = 54.0
text = "Select
"
script = ExtResource("1_nua8c")
@ -111,9 +113,9 @@ script = ExtResource("1_nua8c")
visible = false
layout_mode = 1
anchors_preset = 0
offset_left = -556.0
offset_left = -520.0
offset_top = -139.0
offset_right = -556.0
offset_right = -520.0
offset_bottom = -139.0
[node name="Class 1" type="Control" parent="Choose_class_OS"]
@ -121,7 +123,6 @@ layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
scale = Vector2(3.8, 3.8)
[node name="Name" type="Label" parent="Choose_class_OS/Class 1"]
layout_mode = 0
@ -139,10 +140,9 @@ script = ExtResource("1_nua8c")
[node name="Class 2" type="Control" parent="Choose_class_OS"]
anchors_preset = 0
offset_left = 221.0
offset_right = 261.0
offset_bottom = 40.0
scale = Vector2(3.8, 3.8)
offset_top = 54.0
offset_right = 40.0
offset_bottom = 94.0
[node name="Name" type="Label" parent="Choose_class_OS/Class 2"]
layout_mode = 0
@ -160,10 +160,9 @@ script = ExtResource("1_nua8c")
[node name="Class 3" type="Control" parent="Choose_class_OS"]
anchors_preset = 0
offset_left = 445.0
offset_right = 485.0
offset_bottom = 40.0
scale = Vector2(3.8, 3.8)
offset_top = 108.0
offset_right = 40.0
offset_bottom = 148.0
[node name="Name" type="Label" parent="Choose_class_OS/Class 3"]
layout_mode = 0
@ -181,10 +180,9 @@ script = ExtResource("1_nua8c")
[node name="Class 4" type="Control" parent="Choose_class_OS"]
anchors_preset = 0
offset_left = 670.0
offset_right = 710.0
offset_bottom = 40.0
scale = Vector2(3.8, 3.8)
offset_top = 162.0
offset_right = 40.0
offset_bottom = 202.0
[node name="Name" type="Label" parent="Choose_class_OS/Class 4"]
layout_mode = 0
@ -202,10 +200,9 @@ script = ExtResource("1_nua8c")
[node name="Class 5" type="Control" parent="Choose_class_OS"]
anchors_preset = 0
offset_left = 894.0
offset_right = 934.0
offset_bottom = 40.0
scale = Vector2(3.8, 3.8)
offset_top = 216.0
offset_right = 40.0
offset_bottom = 256.0
[node name="Name" type="Label" parent="Choose_class_OS/Class 5"]
layout_mode = 0
@ -228,9 +225,9 @@ anchors_preset = 14
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -560.0
offset_left = -520.0
offset_top = -139.0
offset_right = -560.0
offset_right = -520.0
offset_bottom = -139.0
grow_horizontal = 2
grow_vertical = 2
@ -240,7 +237,6 @@ layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
scale = Vector2(3.8, 3.8)
[node name="Name" type="Label" parent="Choose_class_CS/Class -1"]
layout_mode = 0
@ -258,10 +254,9 @@ script = ExtResource("1_nua8c")
[node name="Class -2" type="Control" parent="Choose_class_CS"]
anchors_preset = 0
offset_left = 221.0
offset_right = 261.0
offset_bottom = 40.0
scale = Vector2(3.8, 3.8)
offset_top = 54.0
offset_right = 40.0
offset_bottom = 94.0
[node name="Name" type="Label" parent="Choose_class_CS/Class -2"]
layout_mode = 0
@ -279,10 +274,9 @@ script = ExtResource("1_nua8c")
[node name="Class -3" type="Control" parent="Choose_class_CS"]
anchors_preset = 0
offset_left = 445.0
offset_right = 485.0
offset_bottom = 40.0
scale = Vector2(3.8, 3.8)
offset_top = 108.0
offset_right = 40.0
offset_bottom = 148.0
[node name="Name" type="Label" parent="Choose_class_CS/Class -3"]
layout_mode = 0
@ -300,10 +294,9 @@ script = ExtResource("1_nua8c")
[node name="Class -4" type="Control" parent="Choose_class_CS"]
anchors_preset = 0
offset_left = 670.0
offset_right = 710.0
offset_bottom = 40.0
scale = Vector2(3.8, 3.8)
offset_top = 162.0
offset_right = 40.0
offset_bottom = 202.0
[node name="Name" type="Label" parent="Choose_class_CS/Class -4"]
layout_mode = 0
@ -321,10 +314,9 @@ script = ExtResource("1_nua8c")
[node name="Class -5" type="Control" parent="Choose_class_CS"]
anchors_preset = 0
offset_left = 894.0
offset_right = 934.0
offset_bottom = 40.0
scale = Vector2(3.8, 3.8)
offset_top = 216.0
offset_right = 40.0
offset_bottom = 256.0
[node name="Name" type="Label" parent="Choose_class_CS/Class -5"]
layout_mode = 0

View File

@ -1,4 +1,19 @@
[gd_scene format=3 uid="uid://gxfhitfre2fj"]
[gd_scene load_steps=7 format=3 uid="uid://gxfhitfre2fj"]
[ext_resource type="Texture2D" uid="uid://vnk3r1p4ao3n" path="res://textures/prototype-textures/Prototype_symbol_cross_32x32px.png" id="1_g1v70"]
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_mhtpk"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_oe47i"]
bg_color = Color(0, 0, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tw7o5"]
bg_color = Color(0.882353, 0, 0.0627451, 1)
[sub_resource type="Theme" id="Theme_xwpjm"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_mkhl7"]
texture = ExtResource("1_g1v70")
[node name="HUD" type="Control"]
layout_mode = 3
@ -11,20 +26,17 @@ mouse_filter = 2
metadata/_edit_use_anchors_ = true
[node name="HealthBar" type="ProgressBar" parent="."]
material = SubResource("CanvasItemMaterial_mhtpk")
layout_mode = 1
anchors_preset = -1
anchor_top = 0.992
anchor_right = 0.003
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_left = 4.0
offset_top = -52.816
offset_right = 50.544
offset_bottom = -54.0
offset_top = -27.0
offset_right = 246.544
grow_vertical = 0
scale = Vector2(13.1253, 13.1253)
value = 10.0
rounded = true
show_percentage = false
theme_override_styles/background = SubResource("StyleBoxFlat_oe47i")
theme_override_styles/fill = SubResource("StyleBoxFlat_tw7o5")
value = 50.0
[node name="Control" type="Control" parent="."]
z_index = -10
@ -50,6 +62,8 @@ offset_bottom = 6.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
theme = SubResource("Theme_xwpjm")
theme_override_styles/panel = SubResource("StyleBoxTexture_mkhl7")
[node name="AmmoDisplay" type="Control" parent="."]
anchors_preset = 0

View File

@ -1,7 +1,11 @@
[gd_scene load_steps=3 format=3 uid="uid://cjlgs86ey1u1o"]
[gd_scene load_steps=5 format=3 uid="uid://cjlgs86ey1u1o"]
[ext_resource type="Script" path="res://scripts/ConnectButton.gd" id="1_nhpm2"]
[ext_resource type="Script" path="res://scripts/Nickname.gd" id="2_5xejq"]
[ext_resource type="Texture2D" uid="uid://vnk3r1p4ao3n" path="res://textures/prototype-textures/Prototype_symbol_cross_32x32px.png" id="2_mk5ih"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_eqsfo"]
texture = ExtResource("2_mk5ih")
[node name="Menu" type="Control"]
layout_mode = 3
@ -11,38 +15,132 @@ anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
scale = Vector2(1, 1.00231)
color = Color(0.0392157, 0.360784, 0.419608, 1)
[node name="ColorRect2" type="ColorRect" parent="ColorRect"]
layout_mode = 1
anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = -39.4052
offset_bottom = 0.594849
grow_horizontal = 2
grow_vertical = 0
[node name="ConnectMenu" type="Control" parent="."]
anchors_preset = 0
offset_left = 24.0
offset_top = 496.0
offset_right = 200.0
offset_bottom = 640.0
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -88.0
offset_top = -72.0
offset_right = 88.0
offset_bottom = 72.0
grow_horizontal = 2
grow_vertical = 2
[node name="ColorRect" type="ColorRect" parent="ConnectMenu"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -125.0
offset_top = -73.0
offset_right = 75.0
offset_bottom = 7.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.509804, 0.509804, 0.509804, 1)
[node name="ColorRect2" type="ColorRect" parent="ConnectMenu"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -125.0
offset_top = -102.0
offset_right = 75.0
offset_bottom = -72.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.439216, 0.439216, 0.439216, 1)
[node name="https" type="TextEdit" parent="ConnectMenu"]
custom_minimum_size = Vector2(10, 0)
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -123.0
offset_top = -100.0
offset_right = -73.0
offset_bottom = -75.0
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/background_color = Color(0.231373, 0.231373, 0.231373, 1)
theme_override_colors/font_selected_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 9
text = "https://"
[node name="IP" type="TextEdit" parent="ConnectMenu"]
layout_mode = 2
offset_left = 1.0
offset_right = 170.0
offset_bottom = 39.0
offset_left = 15.0
offset_top = -28.0
offset_right = 95.0
offset_bottom = -3.0
theme_override_colors/background_color = Color(0.231373, 0.231373, 0.231373, 1)
theme_override_colors/font_selected_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 9
text = "127.0.0.1"
placeholder_text = "IP Address"
[node name="Port" type="TextEdit" parent="ConnectMenu"]
layout_mode = 2
offset_top = 43.0
offset_right = 171.0
offset_bottom = 80.0
offset_left = 95.0
offset_top = -28.0
offset_right = 145.0
offset_bottom = -3.0
theme_override_colors/background_color = Color(0.231373, 0.231373, 0.231373, 1)
theme_override_font_sizes/font_size = 9
text = "2390"
placeholder_text = "Port"
placeholder_text = "Port
"
[node name="Connect" type="Button" parent="ConnectMenu"]
layout_mode = 2
offset_top = 88.0
offset_right = 172.0
offset_bottom = 138.0
offset_left = -25.0
offset_top = 12.0
offset_right = 147.0
offset_bottom = 62.0
pivot_offset = Vector2(88, 24)
text = "Connect"
script = ExtResource("1_nhpm2")
[node name="Panel" type="Panel" parent="ConnectMenu"]
layout_mode = 0
offset_left = 146.0
offset_top = -27.0
offset_right = 161.0
offset_bottom = -12.0
theme_override_styles/panel = SubResource("StyleBoxTexture_eqsfo")
[node name="PlayerMenu" type="Control" parent="."]
anchors_preset = 0
offset_right = 256.0

159
scenes/maps/training.tscn Normal file
View File

@ -0,0 +1,159 @@
[gd_scene load_steps=11 format=3 uid="uid://dx2v4x2jey55t"]
[ext_resource type="Texture2D" uid="uid://c88oa7ckhmvoh" path="res://textures/prototype-textures/Prototype_grey_32x32px.png" id="1_87a53"]
[ext_resource type="Material" uid="uid://bm7dpv2ymo0s" path="res://textures/materials/black.material" id="2_acmnt"]
[ext_resource type="Material" uid="uid://c6sa1jlgmjnln" path="res://textures/materials/orange.tres" id="3_1ncrc"]
[ext_resource type="Texture2D" uid="uid://bxmfgknljdw65" path="res://icon.svg" id="4_6thf3"]
[ext_resource type="PackedScene" uid="uid://833q6upr0s1k" path="res://scenes/special/spawnpoint.tscn" id="5_4t8n8"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_rbwrc"]
albedo_texture = ExtResource("1_87a53")
uv1_scale = Vector3(0.1, 0.1, 0.1)
uv1_triplanar = true
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_lkg5o"]
albedo_texture = ExtResource("4_6thf3")
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_efxfa"]
[sub_resource type="Sky" id="Sky_e5cvk"]
sky_material = SubResource("ProceduralSkyMaterial_efxfa")
[sub_resource type="Environment" id="Environment_n1nic"]
background_mode = 2
sky = SubResource("Sky_e5cvk")
ambient_light_source = 3
ambient_light_color = Color(0.0666667, 0.0235294, 0.129412, 1)
ambient_light_energy = 8.35
reflected_light_source = 2
tonemap_mode = 3
tonemap_exposure = 0.95
tonemap_white = 4.37
[node name="training" type="Node3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 26.508, -20.0195, 0)
[node name="CSGCombiner3D" type="CSGCombiner3D" parent="."]
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 14.2632, 0)
use_collision = true
[node name="street" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(100, 0, 0, 0, 150, 0, 0, 0, 100, -244.068, 66.1137, -14.1194)
size = Vector3(1.98291, 0.503906, 2.3484)
material = SubResource("StandardMaterial3D_rbwrc")
[node name="shooting_sub" type="CSGBox3D" parent="CSGCombiner3D/street"]
transform = Transform3D(-1.29289e-08, 0, -0.211434, 0, 0.0150877, 0, 0.295778, 0, -9.24206e-09, -0.671881, -0.189736, -1.16362)
operation = 2
size = Vector3(0.0764232, 7.78497, 1.91521)
material = ExtResource("3_1ncrc")
[node name="street_sub" type="CSGBox3D" parent="CSGCombiner3D/street"]
transform = Transform3D(0.93, 0, 0, 0, 0.99, 0, 0, 0, 0.94, 0.00422084, -0.000894368, -0.000665724)
operation = 2
size = Vector3(2.11789, 0.501953, 2.45102)
material = ExtResource("2_acmnt")
[node name="parkour" type="CSGBox3D" parent="CSGCombiner3D/street"]
transform = Transform3D(0.10194, 0, 0, 0, 0.0226455, 0, 0, 0, 0.0377425, 0.93736, -0.23922, -0.935865)
size = Vector3(1, 0.89447, 0.90625)
material = ExtResource("3_1ncrc")
[node name="parkour_box1" type="CSGBox3D" parent="CSGCombiner3D/street/parkour"]
transform = Transform3D(0.991001, 0, 0, 0, 1.09596, 0, 0, 0, 1.25, 0.00752103, 2.28263, 7.40127)
size = Vector3(0.950317, 0.922791, 2.14742)
material = ExtResource("3_1ncrc")
[node name="parkour_box2" type="CSGBox3D" parent="CSGCombiner3D/street/parkour"]
transform = Transform3D(0.991001, 0, 0, 0, 1.09596, 0, 0, 0, 1.25, 0.00752103, 2.88176, 12.7006)
size = Vector3(0.950317, 0.922791, 2.14742)
material = ExtResource("3_1ncrc")
[node name="parkour_box3" type="CSGBox3D" parent="CSGCombiner3D/street/parkour"]
transform = Transform3D(0.991001, 0, 0, 0, 1.09596, 0, 0, 0, 1.25, 0.00752103, 3.79818, 17.8686)
size = Vector3(0.950317, 0.922791, 2.14742)
material = ExtResource("3_1ncrc")
[node name="parkour_box4" type="CSGBox3D" parent="CSGCombiner3D/street/parkour"]
transform = Transform3D(0.991001, 0, 0, 0, 1.09596, 0, 0, 0, 1.25, 0.00752103, 3.79817, 22.0665)
size = Vector3(0.950317, 0.922791, 2.14742)
material = ExtResource("3_1ncrc")
[node name="parkour_box5" type="CSGBox3D" parent="CSGCombiner3D/street/parkour"]
transform = Transform3D(0.991001, 0, 0, 0, 1.09596, 0, 0, 0, 1.25, 0.00752103, 5.20021, 27.0735)
size = Vector3(0.950317, 0.922791, 2.14742)
material = ExtResource("3_1ncrc")
[node name="parkour_box6" type="CSGBox3D" parent="CSGCombiner3D/street/parkour"]
transform = Transform3D(0.991001, 0, 0, 0, 1.09596, 0, 0, 0, 1.25, 0.00752103, 5.20021, 32.3758)
size = Vector3(0.950317, 0.922791, 2.14742)
material = ExtResource("3_1ncrc")
[node name="parkour_box7" type="CSGBox3D" parent="CSGCombiner3D/street/parkour"]
transform = Transform3D(0.991001, 0, 0, 0, 1.09595, 0, 0, 0, 1.25, 0.00752103, 6.73271, 37.7022)
size = Vector3(0.950317, 0.922791, 2.14742)
material = ExtResource("3_1ncrc")
[node name="parkour_box13" type="CSGBox3D" parent="CSGCombiner3D/street/parkour"]
transform = Transform3D(0.991001, 0, 0, 0, 1.09598, 0, 0, 0, 1.25, 0.0266271, 6.85271, 47.0988)
size = Vector3(0.959534, 0.922791, 2.1595)
material = ExtResource("3_1ncrc")
[node name="parkour_end" type="CSGBox3D" parent="CSGCombiner3D/street/parkour"]
transform = Transform3D(1, 0, 0, 0, 0.999992, 0, 0, 0, 1, -0.347962, 9.17355, 53.0341)
size = Vector3(1.69592, 5.45794, 4.52627)
material = ExtResource("3_1ncrc")
[node name="parkour_sub_end" type="CSGBox3D" parent="CSGCombiner3D/street/parkour/parkour_end"]
transform = Transform3D(0.9, 0, 0, 0, 1.14301, 0, 0, 0, 0.9, 0, 0.0240231, 0)
operation = 2
size = Vector3(1.69592, 4.45982, 4.52627)
material = ExtResource("3_1ncrc")
[node name="parkour_end_door" type="CSGBox3D" parent="CSGCombiner3D/street/parkour/parkour_end"]
transform = Transform3D(0.900002, 0, 0, 0, 1.14301, 0, 0, 0, 0.9, 0.404045, -0.201972, -2.16516)
operation = 2
size = Vector3(0.8032, 4.06438, 0.304638)
material = ExtResource("3_1ncrc")
[node name="parkour_end_box)" type="CSGBox3D" parent="CSGCombiner3D/street/parkour/parkour_end"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.561937, -0.663228, -4.19617e-05)
size = Vector3(0.401611, 3.72974, 4.05717)
material = SubResource("StandardMaterial3D_lkg5o")
[node name="spawn" type="CSGBox3D" parent="CSGCombiner3D/street"]
transform = Transform3D(0.273923, 0, 0, 0, 0.0226455, 0, 0, 0, 0.275283, 0.0126988, -0.249108, -1.0268)
size = Vector3(1, 0.31958, 0.937866)
material = ExtResource("3_1ncrc")
[node name="shooting_range" type="CSGBox3D" parent="CSGCombiner3D/street"]
transform = Transform3D(-1.27646e-08, 0, -0.223462, 0, 0.0142314, 0, 0.292019, 0, -9.76781e-09, -0.671244, -0.188671, -1.58776)
size = Vector3(2.96117, 8.45836, 1.82671)
material = ExtResource("3_1ncrc")
[node name="shooting_sub" type="CSGBox3D" parent="CSGCombiner3D/street/shooting_range"]
transform = Transform3D(1, 0, 0, 0, 1.06017, 0, 0, 0, 0.94, 0.131983, -0.101251, 0)
operation = 2
size = Vector3(2.78656, 7.7854, 1.92123)
material = ExtResource("3_1ncrc")
[node name="fence" type="CSGBox3D" parent="CSGCombiner3D/street/shooting_range"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 7.10543e-15, 0, 1.00244, 1.26456, -3.23811, 0.00521278)
size = Vector3(0.0600586, 1.92407, 1.78809)
material = ExtResource("2_acmnt")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.00940726, 0.999898, -0.0107741, 0.0036501, 0.0107402, 0.999936, 0.999949, -0.00944598, -0.00354869, -44.6165, 55.8676, -6.56245e-06)
light_angular_distance = 11.76
shadow_enabled = true
shadow_bias = 0.665
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_n1nic")
[node name="spawnpoint" parent="." instance=ExtResource("5_4t8n8")]
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -48.5215, 20.4632, -22.9326)
team = 1
[node name="spawnpoint2" parent="." instance=ExtResource("5_4t8n8")]
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -48.5284, 20.257, -22.8886)