Used procedural mesh in semaphore level

This commit is contained in:
Vojta committed 2025-02-24 22:49:03 +01:00
1 parent f39c7e70c7
commit a50449c71b
5 files changed
+75 -10

No files matched your search

+36 -4
View File
@@ -1,12 +1,12 @@
[gd_scene load_steps=12 format=3 uid="uid://27pb62xwsqd8"]
[gd_scene load_steps=14 format=4 uid="uid://27pb62xwsqd8"]
[ext_resource type="PackedScene" uid="uid://b5x7fmpwck335" path="res://hud.tscn" id="1_mmt1i"]
[ext_resource type="MeshLibrary" uid="uid://bedqgubx1g1uf" path="res://prototypes.tres" id="2_vdsn8"]
[ext_resource type="ArrayMesh" uid="uid://bqilnvlfws6xh" path="res://portal-mesh.tres" id="3_c4jka"]
[ext_resource type="Script" uid="uid://d2bvvjsibau8c" path="res://addons/simple-portal-system/scripts/portal.gd" id="4_top28"]
[ext_resource type="Script" uid="uid://bkv7t4hw21byg" path="res://addons/simple-portal-system/scripts/simple_portal_teleport.gd" id="5_evjit"]
[ext_resource type="PackedScene" uid="uid://cgdlowfuuorvi" path="res://player.tscn" id="6_hlt8e"]
[ext_resource type="Script" uid="uid://cili3lyodjqel" path="res://portal_environment_adapter.gd" id="7_2gewm"]
[ext_resource type="PackedScene" uid="uid://d1dtxvwk86ple" path="res://procedural_mesh_maker.tscn" id="8_vdsn8"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_b0o0q"]
sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
@@ -22,9 +22,37 @@ tonemap_mode = 3
tonemap_exposure = 1.5
glow_enabled = true
[sub_resource type="ArrayMesh" id="ArrayMesh_vdsn8"]
_surfaces = [{
"aabb": AABB(-1, -1, -0.1, 2, 2, 0.1),
"attribute_data": PackedByteArray("AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AACAPwAAgD/NzEw9zcxMPTMzcz/NzEw9zcxMPTMzcz8zM3M/MzNzPw=="),
"format": 34359742487,
"index_count": 30,
"index_data": PackedByteArray("AAABAAQABAABAAUAAQADAAUABQADAAcAAwACAAcABwACAAYAAgAAAAYABgAAAAQABAAFAAYABgAFAAcA"),
"name": "Portal Material",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 8,
"vertex_data": PackedByteArray("AACAvwAAgD8AAAAAAACAPwAAgD8AAAAAAACAvwAAgL8AAAAAAACAPwAAgL8AAAAAZmZmv2ZmZj/NzMy9ZmZmP2ZmZj/NzMy9ZmZmv2ZmZr/NzMy9ZmZmP2ZmZr/NzMy9/3//f/9/AID/f/9//38AgP9//3//fwCA/3//f/9/AID/f/9//38AgP9//3//fwCA/3//f/9/AID/f/9//38AgA==")
}]
[sub_resource type="BoxShape3D" id="BoxShape3D_cgnft"]
size = Vector3(2, 2, 0.5)
[sub_resource type="ArrayMesh" id="ArrayMesh_mmt1i"]
_surfaces = [{
"aabb": AABB(-1, -1, -0.1, 2, 2, 0.1),
"attribute_data": PackedByteArray("AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AACAPwAAgD/NzEw9zcxMPTMzcz/NzEw9zcxMPTMzcz8zM3M/MzNzPw=="),
"format": 34359742487,
"index_count": 30,
"index_data": PackedByteArray("AAABAAQABAABAAUAAQADAAUABQADAAcAAwACAAcABwACAAYAAgAAAAYABgAAAAQABAAFAAYABgAFAAcA"),
"name": "Portal Material",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 8,
"vertex_data": PackedByteArray("AACAvwAAgD8AAAAAAACAPwAAgD8AAAAAAACAvwAAgL8AAAAAAACAPwAAgL8AAAAAZmZmv2ZmZj/NzMy9ZmZmP2ZmZj/NzMy9ZmZmv2ZmZr/NzMy9ZmZmP2ZmZr/NzMy9/3//f/9/AID/f/9//38AgP9//3//fwCA/3//f/9/AID/f/9//38AgP9//3//fwCA/3//f/9/AID/f/9//38AgA==")
}]
[node name="level_3rooms" type="Node3D"]
[node name="HUD" parent="." instance=ExtResource("1_mmt1i")]
@@ -44,7 +72,7 @@ metadata/_editor_floor_ = Vector3(0, 3, 0)
[node name="Portal_red" type="MeshInstance3D" parent="." node_paths=PackedStringArray("exit_portal")]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -0.5, 2, -4)
mesh = ExtResource("3_c4jka")
mesh = SubResource("ArrayMesh_vdsn8")
skeleton = NodePath("")
script = ExtResource("4_top28")
vertical_viewport_resolution = 1080
@@ -63,7 +91,7 @@ shape = SubResource("BoxShape3D_cgnft")
[node name="Portal_orange" type="MeshInstance3D" parent="." node_paths=PackedStringArray("exit_portal")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 2, -0.5)
mesh = ExtResource("3_c4jka")
mesh = SubResource("ArrayMesh_mmt1i")
skeleton = NodePath("")
script = ExtResource("4_top28")
vertical_viewport_resolution = 1080
@@ -104,3 +132,7 @@ omni_range = 4.0
[node name="PortalEnvironmentAdapter" type="Node" parent="." node_paths=PackedStringArray("base")]
script = ExtResource("7_2gewm")
base = NodePath("../WorldEnvironment")
[node name="ProceduralMeshMaker" parent="." node_paths=PackedStringArray("portal") instance=ExtResource("8_vdsn8")]
width = 2.0
portal = NodePath("../Portal_orange")
+2
View File
@@ -64,7 +64,9 @@ script = ExtResource("1_ksg6r")
height = 2.6
width = 2.0
indent = 0.133
shadow_mesh = true
portal = NodePath("../MeshInstance3D")
portal_material = ExtResource("1_dn1le")
[node name="OmniLight3D" type="OmniLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.52963, 0, 1.51112)