diff --git a/3D/MapScenes/Tutorial_3D.tscn b/3D/MapScenes/Tutorial_3D.tscn index 5ec13903..d9e5bb98 100644 --- a/3D/MapScenes/Tutorial_3D.tscn +++ b/3D/MapScenes/Tutorial_3D.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=43 format=4 uid="uid://xm6y2sc3qx3u"] +[gd_scene load_steps=38 format=4 uid="uid://xm6y2sc3qx3u"] [ext_resource type="Script" uid="uid://kno58homctew" path="res://addons/func_godot/src/map/func_godot_map.gd" id="1_0nxt4"] [ext_resource type="Resource" uid="uid://cx41lsryg5wpm" path="res://3D/TrenchBroom/map_settings.tres" id="2_oj1gl"] @@ -10,18 +10,13 @@ [ext_resource type="Texture2D" uid="uid://cyg2snr1w5xw5" path="res://addons/func_godot/textures/default_texture.png" id="7_y5qwg"] [ext_resource type="Script" uid="uid://ddsqqfx1usc3j" path="res://Scripts/Resources/DamageResistance.cs" id="8_a76rt"] [ext_resource type="PackedScene" uid="uid://c8wwioforxms3" path="res://3D/Scenes/Props/Box_3D_Green.tscn" id="9_oq1x0"] -[ext_resource type="PackedScene" uid="uid://bkwuuk6ctadu0" path="res://3D/Scenes/Props/Capacitor_Mini_3D.tscn" id="10_p35ay"] [ext_resource type="PackedScene" uid="uid://d2kqcbr5rufxb" path="res://3D/Scenes/Props/Wooden_Box.tscn" id="11_rm4i5"] [ext_resource type="PackedScene" uid="uid://jffyxmft3nbw" path="res://3D/Scenes/Props/Box_3D_Red.tscn" id="12_aied7"] -[ext_resource type="PackedScene" uid="uid://c0262d4ffxx1w" path="res://3D/Scenes/Props/Door_Path_3D.tscn" id="14_lb6lh"] -[ext_resource type="PackedScene" uid="uid://jhdx1778ndss" path="res://3D/Scenes/Props/Ac_Unit_3D.tscn" id="15_xgap0"] +[ext_resource type="PackedScene" uid="uid://bubtvv3pa06py" path="res://3D/Scenes/Props/Door_3D.tscn" id="13_c8txc"] [ext_resource type="PackedScene" uid="uid://cpx5yjfg3a2hw" path="res://3D/Scenes/Props/Alarm_Box_3D.tscn" id="16_rrcqh"] [ext_resource type="PackedScene" uid="uid://br01ww57uaky5" path="res://3D/Scenes/Props/Box_3D_Blue.tscn" id="17_1oxql"] [ext_resource type="PackedScene" uid="uid://c6cdl3y3i3axl" path="res://3D/Scenes/Props/Box_3D_Yellow.tscn" id="18_dkxgr"] -[ext_resource type="PackedScene" uid="uid://wh668b8ospcb" path="res://3D/Scenes/Props/Capacitor_3D.tscn" id="19_imye0"] -[ext_resource type="PackedScene" uid="uid://dyi4ji0t3ryi4" path="res://3D/Scenes/Props/chest_3d.tscn" id="20_30bs2"] [ext_resource type="PackedScene" uid="uid://du6hlcoq0iip4" path="res://3D/Scenes/Props/control_pad_3d.tscn" id="21_7tbin"] -[ext_resource type="PackedScene" uid="uid://b3io3bage2qyb" path="res://3D/Scenes/Props/Elevator_Path_3D.tscn" id="22_h1mng"] [ext_resource type="PackedScene" uid="uid://dioiq4nb7kiet" path="res://3D/Scenes/Props/ForceField_3D.tscn" id="23_2wjgd"] [ext_resource type="PackedScene" uid="uid://5jwj0xm33bfs" path="res://3D/Scenes/Props/Mainframe_3D.tscn" id="24_m3k7g"] [ext_resource type="PackedScene" uid="uid://cxci0rfd070sk" path="res://3D/Scenes/Props/Stairs_Mini_3D.tscn" id="25_yh25m"] @@ -29,12 +24,12 @@ [ext_resource type="PackedScene" uid="uid://c3w0y1513hhbi" path="res://3D/BlockbenchModels/Tank/Tank_3D_Big.tscn" id="27_j1ta1"] [ext_resource type="PackedScene" uid="uid://cgy5kmem2hrps" path="res://3D/Scenes/Props/Wall_Fan_3D.tscn" id="28_nammt"] -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_h3dcj"] +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_cxcg6"] albedo_texture = ExtResource("7_y5qwg") metallic_specular = 0.0 texture_filter = 2 -[sub_resource type="ArrayMesh" id="ArrayMesh_cpobl"] +[sub_resource type="ArrayMesh" id="ArrayMesh_naoea"] _surfaces = [{ "aabb": AABB(-3.5, 0, -3.5, 16, 1, 8.5), "attribute_data": PackedByteArray("AADgQAAAAMAAAOBAAAAAAAAAEMEAAAAAAAAQwQAAAMAAAODAAAAAwAAAIEEAAADAAAAgQQAAAAAAAODAAAAAAAAA4MAAABDBAAAgQQAAEMEAACBBAADgQAAA4MAAAOBAAADgwAAAAMAAABBBAAAAwAAAEEEAAAAAAADgwAAAAAAAABDBAAAAwAAAEMEAAAAAAADIwQAAAAAAAMjBAAAAwAAA4MAAAMjBAAAgQQAAyMEAACBBAAAQwQAA4MAAABDBAADgQAAAAMAAAOBAAAAAAAAAIMEAAAAAAAAgwQAAAMAAABBBAAAAwAAAyEEAAADAAADIQQAAAAAAABBBAAAAAA=="), @@ -77,7 +72,7 @@ _surfaces = [{ "format": 34359742487, "index_count": 36, "index_data": PackedByteArray("AAABAAIAAAACAAMABAAFAAYABAAGAAcACAAJAAoACAAKAAsADAANAA4ADAAOAA8AEAARABIAEAASABMAFAAVABYAFAAWABcA"), -"material": SubResource("StandardMaterial3D_h3dcj"), +"material": SubResource("StandardMaterial3D_cxcg6"), "name": "__TB_empty", "primitive": 3, "uv_scale": Vector4(0, 0, 0, 0), @@ -85,41 +80,41 @@ _surfaces = [{ "vertex_data": PackedByteArray("AACAPwAAgL8AAIDBAACAPwAAAMAAAIDBAACoQQAAAMAAAIDBAACoQQAAgL8AAIDBAACAPwAAgL8AAIDBAACAPwAAgL8AAODAAACAPwAAAMAAAODAAACAPwAAAMAAAIDBAACoQQAAAMAAAIDBAACAPwAAAMAAAIDBAACAPwAAAMAAAODAAACoQQAAAMAAAODAAACoQQAAgL8AAIDBAACoQQAAgL8AAODAAACAPwAAgL8AAODAAACAPwAAgL8AAIDBAACoQQAAgL8AAIDBAACoQQAAAMAAAIDBAACoQQAAAMAAAODAAACoQQAAgL8AAODAAACAPwAAgL8AAODAAACoQQAAgL8AAODAAACoQQAAAMAAAODAAACAPwAAAMAAAODA/////wAA/7//////AAD/v/////8AAP+//////wAA/78AAP9//3//vwAA/3//f/+/AAD/f/9//78AAP9//3//v/9/AAD//////38AAP//////fwAA//////9/AAD//////3////9//7//f////3//v/9/////f/+//3////9//7////9//////////3//////////f/////////9///////9//3////+//3//f////7//f/9/////v/9//3////+/") }] -[sub_resource type="ArrayOccluder3D" id="ArrayOccluder3D_t3wc0"] +[sub_resource type="ArrayOccluder3D" id="ArrayOccluder3D_vhum4"] vertices = PackedVector3Array(-3.5, 1, -3.5, -3.5, 0, -3.5, 4.5, 0, -3.5, 4.5, 1, -3.5, -3.5, 1, -3.5, -3.5, 1, 5, -3.5, 0, 5, -3.5, 0, -3.5, 4.5, 1, -3.5, 4.5, 1, 5, -3.5, 1, 5, -3.5, 1, -3.5, -3.5, 1, 5, 4.5, 1, 5, 4.5, 0, 5, -3.5, 0, 5, 4.5, 1, -3.5, 4.5, 0, -3.5, 12.5, 0, -3.5, 12.5, 1, -3.5, 12.5, 1, -3.5, 12.5, 1, 5, 4.5, 1, 5, 4.5, 1, -3.5, 12.5, 1, -3.5, 12.5, 0, -3.5, 12.5, 0, 5, 12.5, 1, 5, 4.5, 1, 5, 12.5, 1, 5, 12.5, 0, 5, 4.5, 0, 5, -4.5, -1.5, -16, -4.5, -2.5, -16, 3.5, -2.5, -16, 3.5, -1.5, -16, -4.5, -1.5, -16, -4.5, -1.5, -8, -4.5, -2.5, -8, -4.5, -2.5, -16, 3.5, -2.5, -16, -4.5, -2.5, -16, -4.5, -2.5, -8, 3.5, -2.5, -8, 3.5, -1.5, -16, 3.5, -1.5, -8, -4.5, -1.5, -8, -4.5, -1.5, -16, 3.5, -1.5, -16, 3.5, -2.5, -16, 3.5, -2.5, -8, 3.5, -1.5, -8, -4.5, -1.5, -8, 3.5, -1.5, -8, 3.5, -2.5, -8, -4.5, -2.5, -8, 4, 3, -3.5, 4, 1, -3.5, 4.5, 1, -3.5, 4.5, 3, -3.5, 4, 3, -3.5, 4, 3, 0, 4, 1, 0, 4, 1, -3.5, 4.5, 1, -3.5, 4, 1, -3.5, 4, 1, 0, 4.5, 1, 0, 4.5, 3, -3.5, 4.5, 3, 0, 4, 3, 0, 4, 3, -3.5, 4.5, 3, -3.5, 4.5, 1, -3.5, 4.5, 1, 0, 4.5, 3, 0, 4, 3, 0, 4.5, 3, 0, 4.5, 1, 0, 4, 1, 0, 4, 3, 2, 4, 1, 2, 4.5, 1, 2, 4.5, 3, 2, 4, 3, 2, 4, 3, 5, 4, 1, 5, 4, 1, 2, 4.5, 1, 2, 4, 1, 2, 4, 1, 5, 4.5, 1, 5, 4.5, 3, 2, 4.5, 3, 5, 4, 3, 5, 4, 3, 2, 4.5, 3, 2, 4.5, 1, 2, 4.5, 1, 5, 4.5, 3, 5, 4, 3, 5, 4.5, 3, 5, 4.5, 1, 5, 4, 1, 5, -3.5, 3, -3.5, -3.5, 1, -3.5, 4, 1, -3.5, 4, 3, -3.5, -3.5, 3, -3.5, -3.5, 3, -3, -3.5, 1, -3, -3.5, 1, -3.5, 4, 1, -3.5, -3.5, 1, -3.5, -3.5, 1, -3, 4, 1, -3, 4, 3, -3.5, 4, 3, -3, -3.5, 3, -3, -3.5, 3, -3.5, 4, 3, -3.5, 4, 1, -3.5, 4, 1, -3, 4, 3, -3, -3.5, 3, -3, 4, 3, -3, 4, 1, -3, -3.5, 1, -3, -3.5, 3, 5, -3.5, 0, 5, 4, 0, 5, 4, 3, 5, -3.5, 3, 5, -3.5, 3, 5.5, -3.5, 0, 5.5, -3.5, 0, 5, 4, 0, 5, -3.5, 0, 5, -3.5, 0, 5.5, 4, 0, 5.5, 4, 3, 5, 4, 3, 5.5, -3.5, 3, 5.5, -3.5, 3, 5, 4, 3, 5, 4, 0, 5, 4, 0, 5.5, 4, 3, 5.5, -3.5, 3, 5.5, 4, 3, 5.5, 4, 0, 5.5, -3.5, 0, 5.5, -3.5, 3, -3, -3.5, 1, -3, -3, 1, -3, -3, 3, -3, -3.5, 3, -3, -3.5, 3, 5, -3.5, 1, 5, -3.5, 1, -3, -3, 1, -3, -3.5, 1, -3, -3.5, 1, 5, -3, 1, 5, -3, 3, -3, -3, 3, 5, -3.5, 3, 5, -3.5, 3, -3, -3, 3, -3, -3, 1, -3, -3, 1, 5, -3, 3, 5, -3.5, 3, 5, -3, 3, 5, -3, 1, 5, -3.5, 1, 5, 4.5, 3, -3.5, 4.5, 1, -3.5, 12.5, 1, -3.5, 12.5, 3, -3.5, 4.5, 3, -3.5, 4.5, 3, -3, 4.5, 1, -3, 4.5, 1, -3.5, 12.5, 1, -3.5, 4.5, 1, -3.5, 4.5, 1, -3, 12.5, 1, -3, 12.5, 3, -3.5, 12.5, 3, -3, 4.5, 3, -3, 4.5, 3, -3.5, 12.5, 3, -3.5, 12.5, 1, -3.5, 12.5, 1, -3, 12.5, 3, -3, 4.5, 3, -3, 12.5, 3, -3, 12.5, 1, -3, 4.5, 1, -3, 4, 3, 5, 4, 0, 5, 12, 0, 5, 12, 3, 5, 4, 3, 5, 4, 3, 5.5, 4, 0, 5.5, 4, 0, 5, 12, 0, 5, 4, 0, 5, 4, 0, 5.5, 12, 0, 5.5, 12, 3, 5, 12, 3, 5.5, 4, 3, 5.5, 4, 3, 5, 12, 3, 5, 12, 0, 5, 12, 0, 5.5, 12, 3, 5.5, 4, 3, 5.5, 12, 3, 5.5, 12, 0, 5.5, 4, 0, 5.5, 1, -1, -16, 1, -2, -16, 21, -2, -16, 21, -1, -16, 1, -1, -16, 1, -1, -7, 1, -2, -7, 1, -2, -16, 21, -2, -16, 1, -2, -16, 1, -2, -7, 21, -2, -7, 21, -1, -16, 21, -1, -7, 1, -1, -7, 1, -1, -16, 21, -1, -16, 21, -2, -16, 21, -2, -7, 21, -1, -7, 1, -1, -7, 21, -1, -7, 21, -2, -7, 1, -2, -7) indices = PackedInt32Array(0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, 10, 11, 12, 13, 14, 12, 14, 15, 16, 17, 18, 16, 18, 19, 20, 21, 22, 20, 22, 23, 24, 25, 26, 24, 26, 27, 28, 29, 30, 28, 30, 31, 32, 33, 34, 32, 34, 35, 36, 37, 38, 36, 38, 39, 40, 41, 42, 40, 42, 43, 44, 45, 46, 44, 46, 47, 48, 49, 50, 48, 50, 51, 52, 53, 54, 52, 54, 55, 56, 57, 58, 56, 58, 59, 60, 61, 62, 60, 62, 63, 64, 65, 66, 64, 66, 67, 68, 69, 70, 68, 70, 71, 72, 73, 74, 72, 74, 75, 76, 77, 78, 76, 78, 79, 80, 81, 82, 80, 82, 83, 84, 85, 86, 84, 86, 87, 88, 89, 90, 88, 90, 91, 92, 93, 94, 92, 94, 95, 96, 97, 98, 96, 98, 99, 100, 101, 102, 100, 102, 103, 104, 105, 106, 104, 106, 107, 108, 109, 110, 108, 110, 111, 112, 113, 114, 112, 114, 115, 116, 117, 118, 116, 118, 119, 120, 121, 122, 120, 122, 123, 124, 125, 126, 124, 126, 127, 128, 129, 130, 128, 130, 131, 132, 133, 134, 132, 134, 135, 136, 137, 138, 136, 138, 139, 140, 141, 142, 140, 142, 143, 144, 145, 146, 144, 146, 147, 148, 149, 150, 148, 150, 151, 152, 153, 154, 152, 154, 155, 156, 157, 158, 156, 158, 159, 160, 161, 162, 160, 162, 163, 164, 165, 166, 164, 166, 167, 168, 169, 170, 168, 170, 171, 172, 173, 174, 172, 174, 175, 176, 177, 178, 176, 178, 179, 180, 181, 182, 180, 182, 183, 184, 185, 186, 184, 186, 187, 188, 189, 190, 188, 190, 191, 192, 193, 194, 192, 194, 195, 196, 197, 198, 196, 198, 199, 200, 201, 202, 200, 202, 203, 204, 205, 206, 204, 206, 207, 208, 209, 210, 208, 210, 211, 212, 213, 214, 212, 214, 215, 216, 217, 218, 216, 218, 219, 220, 221, 222, 220, 222, 223, 224, 225, 226, 224, 226, 227, 228, 229, 230, 228, 230, 231, 232, 233, 234, 232, 234, 235, 236, 237, 238, 236, 238, 239, 240, 241, 242, 240, 242, 243, 244, 245, 246, 244, 246, 247) -[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_c0uab"] +[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_yvg5m"] points = PackedVector3Array(-3.5, 1, -3.5, -3.5, 0, -3.5, 4.5, 0, -3.5, 4.5, 1, -3.5, -3.5, 1, 5, -3.5, 0, 5, 4.5, 0, 5, 4.5, 1, 5) -[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_5wux4"] +[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_y5qwg"] points = PackedVector3Array(-4.5, -1.5, -16, -4.5, -2.5, -16, 3.5, -2.5, -16, 3.5, -1.5, -16, -4.5, -1.5, -8, -4.5, -2.5, -8, 3.5, -2.5, -8, 3.5, -1.5, -8) -[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_eqs8o"] +[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_lb6lh"] points = PackedVector3Array(4, 3, -3.5, 4, 1, -3.5, 4.5, 1, -3.5, 4.5, 3, -3.5, 4, 3, 0, 4, 1, 0, 4.5, 1, 0, 4.5, 3, 0) -[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_x3jyj"] +[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_xgap0"] points = PackedVector3Array(4, 3, 2, 4, 1, 2, 4.5, 1, 2, 4.5, 3, 2, 4, 3, 5, 4, 1, 5, 4.5, 1, 5, 4.5, 3, 5) -[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_l8rdh"] +[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_rrcqh"] points = PackedVector3Array(4.5, 1, -3.5, 4.5, 0, -3.5, 12.5, 0, -3.5, 12.5, 1, -3.5, 4.5, 1, 5, 4.5, 0, 5, 12.5, 0, 5, 12.5, 1, 5) -[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_adfik"] +[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_1oxql"] points = PackedVector3Array(-3.5, 3, -3.5, -3.5, 1, -3.5, 4, 1, -3.5, 4, 3, -3.5, -3.5, 3, -3, -3.5, 1, -3, 4, 1, -3, 4, 3, -3) -[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_mwp2y"] +[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_dkxgr"] points = PackedVector3Array(-3.5, 3, 5, -3.5, 0, 5, 4, 0, 5, 4, 3, 5, -3.5, 3, 5.5, -3.5, 0, 5.5, 4, 0, 5.5, 4, 3, 5.5) -[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_4g3j7"] +[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_imye0"] points = PackedVector3Array(-3.5, 3, -3, -3.5, 1, -3, -3, 1, -3, -3, 3, -3, -3.5, 3, 5, -3.5, 1, 5, -3, 1, 5, -3, 3, 5) -[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_72w6d"] +[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_30bs2"] points = PackedVector3Array(4.5, 3, -3.5, 4.5, 1, -3.5, 12.5, 1, -3.5, 12.5, 3, -3.5, 4.5, 3, -3, 4.5, 1, -3, 12.5, 1, -3, 12.5, 3, -3) -[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_5qenh"] +[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_7tbin"] points = PackedVector3Array(4, 3, 5, 4, 0, 5, 12, 0, 5, 12, 3, 5, 4, 3, 5.5, 4, 0, 5.5, 12, 0, 5.5, 12, 3, 5.5) -[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_bp2b0"] +[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_h1mng"] points = PackedVector3Array(1, -1, -16, 1, -2, -16, 21, -2, -16, 21, -1, -16, 1, -1, -7, 1, -2, -7, 21, -2, -7, 21, -1, -7) [node name="Tutorial3d" type="Node3D"] @@ -135,43 +130,43 @@ collision_mask = 0 script = ExtResource("3_rhkt8") [node name="entity_0_mesh_instance" type="MeshInstance3D" parent="FuncGodotMap/entity_0_worldspawn"] -mesh = SubResource("ArrayMesh_cpobl") +mesh = SubResource("ArrayMesh_naoea") [node name="entity_0_occluder_instance" type="OccluderInstance3D" parent="FuncGodotMap/entity_0_worldspawn"] -occluder = SubResource("ArrayOccluder3D_t3wc0") +occluder = SubResource("ArrayOccluder3D_vhum4") [node name="entity_0_brush_0_collision_shape" type="CollisionShape3D" parent="FuncGodotMap/entity_0_worldspawn"] -shape = SubResource("ConvexPolygonShape3D_c0uab") +shape = SubResource("ConvexPolygonShape3D_yvg5m") [node name="entity_0_brush_1_collision_shape" type="CollisionShape3D" parent="FuncGodotMap/entity_0_worldspawn"] -shape = SubResource("ConvexPolygonShape3D_5wux4") +shape = SubResource("ConvexPolygonShape3D_y5qwg") [node name="entity_0_brush_2_collision_shape" type="CollisionShape3D" parent="FuncGodotMap/entity_0_worldspawn"] -shape = SubResource("ConvexPolygonShape3D_eqs8o") +shape = SubResource("ConvexPolygonShape3D_lb6lh") [node name="entity_0_brush_3_collision_shape" type="CollisionShape3D" parent="FuncGodotMap/entity_0_worldspawn"] -shape = SubResource("ConvexPolygonShape3D_x3jyj") +shape = SubResource("ConvexPolygonShape3D_xgap0") [node name="entity_0_brush_4_collision_shape" type="CollisionShape3D" parent="FuncGodotMap/entity_0_worldspawn"] -shape = SubResource("ConvexPolygonShape3D_l8rdh") +shape = SubResource("ConvexPolygonShape3D_rrcqh") [node name="entity_0_brush_5_collision_shape" type="CollisionShape3D" parent="FuncGodotMap/entity_0_worldspawn"] -shape = SubResource("ConvexPolygonShape3D_adfik") +shape = SubResource("ConvexPolygonShape3D_1oxql") [node name="entity_0_brush_6_collision_shape" type="CollisionShape3D" parent="FuncGodotMap/entity_0_worldspawn"] -shape = SubResource("ConvexPolygonShape3D_mwp2y") +shape = SubResource("ConvexPolygonShape3D_dkxgr") [node name="entity_0_brush_7_collision_shape" type="CollisionShape3D" parent="FuncGodotMap/entity_0_worldspawn"] -shape = SubResource("ConvexPolygonShape3D_4g3j7") +shape = SubResource("ConvexPolygonShape3D_imye0") [node name="entity_0_brush_8_collision_shape" type="CollisionShape3D" parent="FuncGodotMap/entity_0_worldspawn"] -shape = SubResource("ConvexPolygonShape3D_72w6d") +shape = SubResource("ConvexPolygonShape3D_30bs2") [node name="entity_0_brush_9_collision_shape" type="CollisionShape3D" parent="FuncGodotMap/entity_0_worldspawn"] -shape = SubResource("ConvexPolygonShape3D_5qenh") +shape = SubResource("ConvexPolygonShape3D_7tbin") [node name="entity_0_brush_10_collision_shape" type="CollisionShape3D" parent="FuncGodotMap/entity_0_worldspawn"] -shape = SubResource("ConvexPolygonShape3D_bp2b0") +shape = SubResource("ConvexPolygonShape3D_h1mng") [node name="entity_1_actor_barrel_1" parent="FuncGodotMap" instance=ExtResource("7_xoc8d")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.5, 1.5, -0.5) @@ -179,66 +174,44 @@ DamageResistances = Array[ExtResource("8_a76rt")]([]) [node name="entity_2_actor_box_green" parent="FuncGodotMap" instance=ExtResource("9_oq1x0")] transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 9.5, 1.25, 1.5) -DamageResistances = Array[ExtResource("8_a76rt")]([]) -[node name="entity_3_actor_capacitor_mini" parent="FuncGodotMap" instance=ExtResource("10_p35ay")] -transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 7.5, 1.5, 0.5) -TargetGroup = "door" - -[node name="entity_4_actor_box_wood" parent="FuncGodotMap" instance=ExtResource("11_rm4i5")] +[node name="entity_3_actor_box_wood" parent="FuncGodotMap" instance=ExtResource("11_rm4i5")] transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 9.5, 1.25, -1.25) -DamageResistances = Array[ExtResource("8_a76rt")]([]) -[node name="entity_5_actor_box_red" parent="FuncGodotMap" instance=ExtResource("12_aied7")] +[node name="entity_4_actor_box_red" parent="FuncGodotMap" instance=ExtResource("12_aied7")] transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 11.5, 1.25, -2.5) -DamageResistances = Array[ExtResource("8_a76rt")]([]) -[node name="entity_6_actor_door_1" parent="FuncGodotMap" instance=ExtResource("14_lb6lh")] -transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 7, 2, -2.25) -TargetName = &"door" +[node name="entity_5_actor_door_1" parent="FuncGodotMap" instance=ExtResource("13_c8txc")] +transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 4.25, 2, 1) +GroupName = "door" -[node name="entity_7_actor_ac_unit" parent="FuncGodotMap" instance=ExtResource("15_xgap0")] -transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, -1.5, 1.5, -1.25) - -[node name="entity_8_actor_alarmbox" parent="FuncGodotMap" instance=ExtResource("16_rrcqh")] +[node name="entity_6_actor_alarmbox" parent="FuncGodotMap" instance=ExtResource("16_rrcqh")] transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 9.75, 1.75, -2.75) -[node name="entity_9_actor_box_blue" parent="FuncGodotMap" instance=ExtResource("17_1oxql")] +[node name="entity_7_actor_box_blue" parent="FuncGodotMap" instance=ExtResource("17_1oxql")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 11.5, 1.25, -0.5) -DamageResistances = Array[ExtResource("8_a76rt")]([]) -[node name="entity_10_actor_box_yellow" parent="FuncGodotMap" instance=ExtResource("18_dkxgr")] +[node name="entity_8_actor_box_yellow" parent="FuncGodotMap" instance=ExtResource("18_dkxgr")] transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 10.5, 1.25, 3.5) -DamageResistances = Array[ExtResource("8_a76rt")]([]) -[node name="entity_11_actor_capacitor" parent="FuncGodotMap" instance=ExtResource("19_imye0")] -transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 5.5, 1.75, 3.5) - -[node name="entity_12_actor_chest_1" parent="FuncGodotMap" instance=ExtResource("20_30bs2")] -transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 7.5, 1.5, 3.5) - -[node name="entity_13_actor_controlpad" parent="FuncGodotMap" node_paths=PackedStringArray("Targets") instance=ExtResource("21_7tbin")] +[node name="entity_9_actor_controlpad" parent="FuncGodotMap" instance=ExtResource("21_7tbin")] transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 8.75, 1.75, -2.75) -Targets = Array[ExtResource("8_a76rt")]([]) -[node name="entity_14_actor_elevator_1" parent="FuncGodotMap" instance=ExtResource("22_h1mng")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 1.125, 1) - -[node name="entity_15_actor_forcefield_1" parent="FuncGodotMap" instance=ExtResource("23_2wjgd")] +[node name="entity_10_actor_forcefield_1" parent="FuncGodotMap" instance=ExtResource("23_2wjgd")] transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, -1, -0.5, -13.25) -[node name="entity_16_actor_mainframe" parent="FuncGodotMap" instance=ExtResource("24_m3k7g")] +[node name="entity_11_actor_mainframe" parent="FuncGodotMap" instance=ExtResource("24_m3k7g")] transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 9.5, -0.25, -12.5) -[node name="entity_17_actor_stairs_mini" parent="FuncGodotMap" instance=ExtResource("25_yh25m")] +[node name="entity_12_actor_stairs_mini" parent="FuncGodotMap" instance=ExtResource("25_yh25m")] transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 17.5, -0.75, -12.5) -[node name="entity_18_actor_table" parent="FuncGodotMap" instance=ExtResource("26_gbnau")] +[node name="entity_13_actor_table" parent="FuncGodotMap" instance=ExtResource("26_gbnau")] transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 6.25, -0.75, -10.5) -[node name="entity_19_actor_tank" parent="FuncGodotMap" instance=ExtResource("27_j1ta1")] +[node name="entity_14_actor_tank" parent="FuncGodotMap" instance=ExtResource("27_j1ta1")] transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 18.5, -0.5, -14.5) -[node name="entity_20_actor_wallfan" parent="FuncGodotMap" instance=ExtResource("28_nammt")] +[node name="entity_15_actor_wallfan" parent="FuncGodotMap" instance=ExtResource("28_nammt")] transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 13.25, -0.25, -13.125) DamageResistances = Array[ExtResource("8_a76rt")]([]) diff --git a/3D/Maps/Tutorial.map b/3D/Maps/Tutorial.map index 0d9a9668..8eb2880a 100644 --- a/3D/Maps/Tutorial.map +++ b/3D/Maps/Tutorial.map @@ -117,93 +117,67 @@ } // entity 3 { -"classname" "actor_capacitor_mini" -"origin" "8 120 24" -"target" "door" -"activationtype" "Open" -} -// entity 4 -{ "classname" "actor_box_wood" "origin" "-20 152 20" } -// entity 5 +// entity 4 { "classname" "actor_box_red" "origin" "-40 184 20" } -// entity 6 +// entity 5 { "classname" "actor_door_1" -"origin" "-36 112 32" +"origin" "16 68 32" "targetname" "door" +"angles" "0 -90 0" } -// entity 7 -{ -"classname" "actor_ac_unit" -"origin" "-20 -24 24" -} -// entity 8 +// entity 6 { "classname" "actor_alarmbox" "origin" "-44 156 28" } -// entity 9 +// entity 7 { "classname" "actor_box_blue" "origin" "-8 184 20" } -// entity 10 +// entity 8 { "classname" "actor_box_yellow" "origin" "56 168 20" } -// entity 11 -{ -"classname" "actor_capacitor" -"origin" "56 88 28" -} -// entity 12 -{ -"classname" "actor_chest_1" -"origin" "56 120 24" -} -// entity 13 +// entity 9 { "classname" "actor_controlpad" "origin" "-44 140 28" } -// entity 14 -{ -"classname" "actor_elevator_1" -"origin" "16 -32 18" -} -// entity 15 +// entity 10 { "classname" "actor_forcefield_1" "origin" "-212 -16 -8" } -// entity 16 +// entity 11 { "classname" "actor_mainframe" "origin" "-200 152 -4" } -// entity 17 +// entity 12 { "classname" "actor_stairs_mini" "origin" "-200 280 -12" } -// entity 18 +// entity 13 { "classname" "actor_table" "origin" "-168 100 -12" } -// entity 19 +// entity 14 { "classname" "actor_tank" "origin" "-232 296 -8" } -// entity 20 +// entity 15 { "classname" "actor_wallfan" "origin" "-210 212 -4" diff --git a/IsoTest/Tutorial_Gameplay.tscn b/IsoTest/Tutorial_Gameplay.tscn index dd684df8..03f30dff 100644 --- a/IsoTest/Tutorial_Gameplay.tscn +++ b/IsoTest/Tutorial_Gameplay.tscn @@ -95,6 +95,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 79.0827, 0, -7.26996) layer = -100 [node name="TextureRect" type="TextureRect" parent="CanvasLayer"] +anchors_preset = -1 offset_right = 319.0 offset_bottom = 181.0 texture = ExtResource("12_b1fwp") diff --git a/Scenes/Actors/IsoPlayer_FSM.tscn b/Scenes/Actors/IsoPlayer_FSM.tscn index 7baabbf6..882a55ff 100644 --- a/Scenes/Actors/IsoPlayer_FSM.tscn +++ b/Scenes/Actors/IsoPlayer_FSM.tscn @@ -288,6 +288,7 @@ Acceleration = 150.0 Deceleration = 20.0 Gravity = -20.0 FallSpeed = 4.0 +TurnSpeed = 1.0 [node name="Storage" type="Node" parent="." node_paths=PackedStringArray("Root", "Shield")] script = ExtResource("6_habpy") diff --git a/Scripts/Components/FSM/3DPlayer/IsoMovementModule.cs b/Scripts/Components/FSM/3DPlayer/IsoMovementModule.cs index f87669ef..0a66e140 100644 --- a/Scripts/Components/FSM/3DPlayer/IsoMovementModule.cs +++ b/Scripts/Components/FSM/3DPlayer/IsoMovementModule.cs @@ -75,47 +75,51 @@ public partial class IsoMovementModule : ModuleBase Mathf.Abs(current.X)) ? accel : decel; + float stepY = (Mathf.Abs(target.Y) > Mathf.Abs(current.Y)) ? accel : decel; + + float newX = Mathf.MoveToward(current.X, target.X, stepX * delta); + float newY = Mathf.MoveToward(current.Y, target.Y, stepY * delta); + return new Vector2(newX, newY); + } + public override void PhysicsProcess(double delta) { - var frameVelocity = MainObject.Velocity.ToVector2(); - var frameVelocityY = MainObject.Velocity.Y; - + var v3 = MainObject.Velocity; + Vector2 v = v3.ToVector2(); + float dt = (float)delta; + + // Read desired input direction for this physics tick + Vector2 inputDir = PlayerStorage.MovementDirection; + + // Clamp diagonal magnitude so diagonals aren't faster (helps remove jittery speed jumps) + float len = inputDir.Length(); + if (len > 1f) + inputDir /= len; + if (_isStrafing) { - // Instant movement at strafe speed - frameVelocity = PlayerStorage.MovementDirection * StrafeSpeed; + // Strafing stays instant/responsive if you want that behavior + v = inputDir * StrafeSpeed; } else { - Vector2 targetVelocity = PlayerStorage.MovementDirection * Speed; + // Build a target *velocity* (not just direction) + Vector2 targetVel = inputDir * Speed; - if (PlayerStorage.MovementDirection != Vector2.Zero) - { - frameVelocity = frameVelocity.MoveToward(targetVelocity, Acceleration * (float)delta); - } - else - { - frameVelocity = frameVelocity.MoveToward(Vector2.Zero, Deceleration * (float)delta); - } + // Per-axis interpolation prevents direction snaps when keys change + v = InterpolateVelocityAxes(v, targetVel, Acceleration, Deceleration, dt); } - - //MainObject.Velocity += _movementDirection * MovementSpeed; - var velocityY = Mathf.Clamp(frameVelocityY + Gravity * (float)delta, -FallSpeed, FallSpeed); + // Y (gravity) + float vy = Mathf.Clamp(v3.Y + Gravity * dt, -FallSpeed, FallSpeed); + if (Input.IsKeyLabelPressed(Key.Z)) vy = 10; - //frameVelocity.Y = velocityY; - - // Debug moonjump - if (Input.IsKeyLabelPressed(Key.Z)) - { - //velocityY -= (float)(100 * delta); - velocityY = 10; - } - - MainObject.Velocity = frameVelocity.ToVector3(velocityY); - - - + MainObject.Velocity = v.ToVector3(vy); MainObject.MoveAndSlide(); } } \ No newline at end of file