Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
808e1503fb | ||
|
|
eeb35efa18 | ||
|
|
2da0429cdd | ||
|
|
f3440af264 |
No files matched your search
@@ -0,0 +1,6 @@
|
||||
# Portals Demo
|
||||
|
||||
Git repos
|
||||
|
||||
- Gitea: https://git.vojtechstruhar.com/Vojta/dp-konzultace
|
||||
- GitHub (mirror): https://github.com/VojtaStruhar/dp-konzultace
|
||||
@@ -0,0 +1,74 @@
|
||||
extends EditorNode3DGizmoPlugin
|
||||
|
||||
|
||||
func _init():
|
||||
print("[gizmo] _init")
|
||||
create_material("main", Color(1,0,1), false, true, false)
|
||||
create_material("secondary", Color(1,0,0))
|
||||
|
||||
|
||||
func _get_gizmo_name() -> String:
|
||||
return "PortalGizmo"
|
||||
|
||||
|
||||
func _has_gizmo(for_node_3d: Node3D) -> bool:
|
||||
var result: bool = for_node_3d is Portal
|
||||
if result: print("[gizmo] _has_gizmo: " + for_node_3d.name)
|
||||
return result
|
||||
|
||||
|
||||
func _redraw(gizmo):
|
||||
var portal = gizmo.get_node_3d() as Portal
|
||||
print("[gizmo] _redraw: " + portal.name)
|
||||
|
||||
gizmo.clear() # Always clear the gizmo
|
||||
|
||||
if portal not in EditorInterface.get_selection().get_selected_nodes():
|
||||
return # If not selected, don't draw anything
|
||||
|
||||
|
||||
var lines = PackedVector3Array()
|
||||
|
||||
|
||||
if portal.exit_portal != null:
|
||||
print("[gizmo] Drawing the bezier")
|
||||
# Draw a bezier curve connecting the two portals
|
||||
var exit = portal.exit_portal
|
||||
var D = portal.global_position.distance_to(exit.global_position)
|
||||
|
||||
var p0 = Vector3.ZERO
|
||||
var p3 = portal.to_local(exit.global_position)
|
||||
var p1 = p0 + -portal.transform.basis.z * D * 0.25 # Control point
|
||||
var p2 = p3 + -exit.transform.basis.z * D * 0.25 # Control point
|
||||
|
||||
var RESOLUTION: int = 24
|
||||
|
||||
lines.push_back(p0)
|
||||
|
||||
for i in range(1, RESOLUTION + 1):
|
||||
var t: float = float(i) / RESOLUTION
|
||||
var spline_pos: Vector3 = pow(1 - t, 3) * p0 \
|
||||
+ 3 * pow(1 - t, 2) * t * p1 \
|
||||
+ 3 * (1 - t) * pow(t, 2) * p2 \
|
||||
+ pow(t, 3) * p3
|
||||
|
||||
lines.push_back(spline_pos)
|
||||
|
||||
lines.push_back(p3)
|
||||
print("[gizmo] Bezier lines: " + str(lines.size()))
|
||||
|
||||
gizmo.add_lines(PackedVector3Array([p0, p3, p1, p2]), get_material("secondary", gizmo))
|
||||
|
||||
|
||||
|
||||
#var handles = PackedVector3Array()
|
||||
#handles.push_back(Vector3(0, 1, 0))
|
||||
#handles.push_back(Vector3(0, 2, 0))
|
||||
|
||||
gizmo.add_lines(lines, get_material("main", gizmo))
|
||||
# Thicker dashed line
|
||||
var l2 = lines.duplicate()
|
||||
for i in range(l2.size()): l2[i].x += 0.01
|
||||
gizmo.add_lines(l2, get_material("main", gizmo))
|
||||
|
||||
#gizmo.add_handles(handles, get_material("handles", gizmo), [])
|
||||
@@ -0,0 +1 @@
|
||||
uid://b8vlwx31bxx4b
|
||||
@@ -0,0 +1,7 @@
|
||||
[plugin]
|
||||
|
||||
name="Portal Gizmos"
|
||||
description="Plugin providing 3D Gizmos for portals"
|
||||
author="Vojtech Struhar"
|
||||
version="0.1"
|
||||
script="portal_gizmos.gd"
|
||||
@@ -0,0 +1,13 @@
|
||||
@tool
|
||||
extends EditorPlugin
|
||||
|
||||
const GIZMO_PACKED = preload("gizmo.gd")
|
||||
var gizmo = GIZMO_PACKED.new()
|
||||
|
||||
func _enter_tree() -> void:
|
||||
print("[portal_gizmos] Enter")
|
||||
add_node_3d_gizmo_plugin(gizmo)
|
||||
|
||||
func _exit_tree() -> void:
|
||||
print("[portal_gizmos] Exit")
|
||||
remove_node_3d_gizmo_plugin(gizmo)
|
||||
@@ -0,0 +1 @@
|
||||
uid://c61kmx68labq0
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=14 format=3 uid="uid://27pb62xwsqd8"]
|
||||
[gd_scene load_steps=12 format=3 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"]
|
||||
@@ -25,20 +25,6 @@ glow_enabled = true
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_cgnft"]
|
||||
size = Vector3(2, 2, 0.5)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_mmt1i"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_vdsn8"]
|
||||
script/source = "extends VisibleOnScreenNotifier3D
|
||||
|
||||
|
||||
func _on_screen_entered() -> void:
|
||||
print(\"enter\")
|
||||
|
||||
|
||||
func _on_screen_exited() -> void:
|
||||
print(\"exit\")
|
||||
"
|
||||
|
||||
[node name="level_3rooms" type="Node3D"]
|
||||
|
||||
[node name="HUD" parent="." instance=ExtResource("1_mmt1i")]
|
||||
@@ -66,7 +52,6 @@ disable_viewport_distance = 32.0
|
||||
fade_out_distance_max = 30.0
|
||||
fade_out_distance_min = 28.0
|
||||
fade_out_color = Color(0, 0, 0, 1)
|
||||
exit_cull_mask = 1048567
|
||||
exit_portal = NodePath("../Portal_orange")
|
||||
|
||||
[node name="Teleport" type="Area3D" parent="Portal_red"]
|
||||
@@ -86,7 +71,6 @@ disable_viewport_distance = 32.0
|
||||
fade_out_distance_max = 30.0
|
||||
fade_out_distance_min = 28.0
|
||||
fade_out_color = Color(0, 0, 0, 1)
|
||||
exit_cull_mask = 1048567
|
||||
exit_portal = NodePath("../Portal_red")
|
||||
|
||||
[node name="Teleport" type="Area3D" parent="Portal_orange"]
|
||||
@@ -120,15 +104,3 @@ omni_range = 4.0
|
||||
[node name="PortalEnvironmentAdapter" type="Node" parent="." node_paths=PackedStringArray("base")]
|
||||
script = ExtResource("7_2gewm")
|
||||
base = NodePath("../WorldEnvironment")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.13581, 2.27608, -5.31256)
|
||||
layers = 8
|
||||
mesh = SubResource("BoxMesh_mmt1i")
|
||||
|
||||
[node name="VisibleOnScreenNotifier3D" type="VisibleOnScreenNotifier3D" parent="MeshInstance3D"]
|
||||
aabb = AABB(-0.5, -0.5, -0.5, 1, 1, 1)
|
||||
script = SubResource("GDScript_vdsn8")
|
||||
|
||||
[connection signal="screen_entered" from="MeshInstance3D/VisibleOnScreenNotifier3D" to="MeshInstance3D/VisibleOnScreenNotifier3D" method="_on_screen_entered"]
|
||||
[connection signal="screen_exited" from="MeshInstance3D/VisibleOnScreenNotifier3D" to="MeshInstance3D/VisibleOnScreenNotifier3D" method="_on_screen_exited"]
|
||||
@@ -35,9 +35,9 @@ environment = SubResource("Environment_272bh")
|
||||
mesh_library = ExtResource("2_2dlki")
|
||||
cell_size = Vector3(1, 1, 1)
|
||||
data = {
|
||||
"cells": PackedInt32Array(0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 0, 65535, 0, 0, 65534, 0, 0, 65533, 0, 0, 65532, 0, 0, 65531, 0, 0, 65530, 0, 1, 65529, 0, 2, 65529, 0, 3, 65529, 0, 3, 65530, 0, 4, 65530, 0, 5, 65530, 0, 5, 65531, 0, 5, 65532, 0, 5, 65533, 0, 5, 65534, 0, 5, 65535, 0, 4, 65535, 0, 3, 65535, 0, 2, 65535, 0, 2, 65534, 0, 1, 65534, 0, 2, 65533, 0, 3, 65533, 0, 4, 65534, 0, 3, 65534, 0, 1, 65535, 0, 65535, 0, 0, 2, 65532, 0, 1, 65532, 0, 1, 65531, 0, 1, 65530, 0, 1, 65533, 0, 4, 65533, 0, 3, 65532, 0, 3, 65531, 0, 2, 65531, 0, 2, 65530, 0, 4, 65532, 0, 4, 65531, 0, 4, 65529, 0, 5, 65529, 0, 0, 65529, 0, 65535, 65529, 0, 65534, 65529, 0, 65532, 65530, 0, 65531, 65531, 0, 65530, 65531, 0, 65530, 65532, 0, 65530, 65535, 0, 65530, 0, 0, 65531, 0, 0, 65534, 0, 0, 65534, 65535, 0, 65534, 65534, 0, 65533, 65534, 0, 65532, 65534, 0, 65531, 65534, 0, 65531, 65535, 0, 65532, 0, 0, 65533, 0, 0, 65532, 65535, 0, 65533, 65535, 0, 65535, 65535, 0, 65533, 65533, 0, 65534, 65533, 0, 65534, 65532, 0, 65534, 65531, 0, 65535, 65533, 0, 65535, 65532, 0, 65535, 65531, 0, 65535, 65530, 0, 65535, 65534, 0, 65532, 65533, 0, 65531, 65533, 0, 65530, 65534, 0, 65530, 65533, 0, 65531, 65532, 0, 65532, 65531, 0, 65534, 65530, 0, 65533, 65530, 0, 65533, 65531, 0, 65533, 65532, 0, 65532, 65532, 0, 65533, 65529, 0, 65532, 65529, 0, 65531, 65529, 0, 65530, 65529, 0, 65530, 65530, 0, 65531, 65530, 0, 131066, 0, 2, 131067, 0, 2, 131068, 0, 2, 131069, 0, 2, 131070, 0, 2, 131071, 0, 2, 65536, 0, 2, 65537, 0, 2, 65538, 0, 2, 65539, 0, 2, 65540, 0, 2, 65541, 0, 2, 65541, 65535, 2, 65541, 65534, 2, 65541, 65533, 2, 65541, 65532, 2, 65541, 65531, 2, 65541, 65530, 2, 65541, 65529, 2, 65540, 65529, 2, 65539, 65529, 2, 65538, 65529, 2, 65537, 65529, 2, 131070, 65529, 2, 131069, 65529, 2, 131068, 65529, 2, 131067, 65529, 2, 131066, 65529, 2, 131066, 65530, 2, 131066, 65531, 2, 131066, 65534, 2, 131066, 65535, 2, 10, 65529, 0, 10, 65530, 0, 10, 65531, 0, 10, 65532, 0, 10, 65533, 0, 10, 65534, 0, 10, 65535, 0, 10, 0, 0, 11, 0, 0, 12, 0, 0, 13, 0, 0, 14, 0, 0, 15, 0, 0, 16, 0, 0, 17, 0, 0, 18, 0, 0, 19, 0, 0, 20, 0, 0, 21, 0, 0, 21, 65535, 0, 21, 65534, 0, 21, 65533, 0, 21, 65532, 0, 21, 65531, 0, 21, 65530, 0, 21, 65529, 0, 20, 65529, 0, 19, 65529, 0, 18, 65529, 0, 17, 65529, 0, 16, 65529, 0, 15, 65529, 0, 14, 65529, 0, 13, 65529, 0, 12, 65529, 0, 11, 65529, 0, 11, 65530, 0, 11, 65531, 0, 11, 65532, 0, 11, 65533, 0, 11, 65534, 0, 11, 65535, 0, 12, 65535, 0, 15, 65535, 0, 16, 65535, 0, 17, 65535, 0, 18, 65535, 0, 19, 65535, 0, 20, 65535, 0, 20, 65534, 0, 20, 65533, 0, 20, 65532, 0, 20, 65531, 0, 20, 65530, 0, 19, 65530, 0, 18, 65530, 0, 17, 65530, 0, 16, 65530, 0, 15, 65530, 0, 14, 65530, 0, 13, 65530, 0, 12, 65530, 0, 12, 65531, 0, 12, 65532, 0, 12, 65533, 0, 12, 65534, 0, 13, 65535, 0, 14, 65535, 0, 14, 65534, 0, 13, 65533, 0, 13, 65532, 0, 13, 65531, 0, 14, 65531, 0, 15, 65531, 0, 16, 65531, 0, 16, 65532, 0, 17, 65532, 0, 18, 65532, 0, 19, 65532, 0, 19, 65531, 0, 19, 65533, 0, 18, 65533, 0, 17, 65534, 0, 16, 65534, 0, 15, 65534, 0, 13, 65534, 0, 18, 65534, 0, 19, 65534, 0, 14, 65533, 0, 14, 65532, 0, 15, 65533, 0, 16, 65533, 0, 17, 65533, 0, 15, 65532, 0, 17, 65531, 0, 18, 65531, 0, 26, 0, 0, 37, 65529, 0, 36, 65529, 0, 35, 65529, 0, 34, 65529, 0, 33, 65529, 0, 32, 65529, 0, 31, 65529, 0, 31, 65530, 0, 30, 65530, 0, 29, 65530, 0, 30, 65529, 0, 29, 65529, 0, 28, 65529, 0, 27, 65529, 0, 26, 65529, 0, 26, 65530, 0, 26, 65531, 0, 26, 65532, 0, 26, 65533, 0, 26, 65534, 0, 26, 65535, 0, 27, 65530, 0, 27, 65531, 0, 27, 65532, 0, 27, 65533, 0, 27, 65534, 0, 27, 65535, 0, 27, 0, 0, 28, 65530, 0, 28, 65531, 0, 28, 65532, 0, 28, 65533, 0, 28, 65534, 0, 28, 65535, 0, 28, 0, 0, 29, 65531, 0, 29, 65532, 0, 29, 65533, 0, 29, 65534, 0, 29, 65535, 0, 29, 0, 0, 30, 65531, 0, 30, 65532, 0, 30, 65533, 0, 30, 65534, 0, 30, 65535, 0, 30, 0, 0, 31, 65531, 0, 31, 65532, 0, 31, 65533, 0, 31, 65534, 0, 31, 65535, 0, 31, 0, 0, 32, 65530, 0, 32, 65531, 0, 32, 65532, 0, 32, 65533, 0, 32, 65534, 0, 32, 65535, 0, 32, 0, 0, 33, 65530, 0, 33, 65531, 0, 33, 65532, 0, 33, 65533, 0, 33, 65534, 0, 33, 65535, 0, 33, 0, 0, 34, 65530, 0, 34, 65531, 0, 34, 65532, 0, 34, 65533, 0, 34, 65534, 0, 34, 65535, 0, 34, 0, 0, 35, 65530, 0, 35, 65531, 0, 35, 65532, 0, 35, 65533, 0, 35, 65534, 0, 35, 65535, 0, 35, 0, 0, 36, 65530, 0, 36, 65531, 0, 36, 65532, 0, 36, 65533, 0, 36, 65534, 0, 36, 65535, 0, 36, 0, 0, 37, 65530, 0, 37, 65531, 0, 37, 65532, 0, 37, 65533, 0, 37, 65534, 0, 37, 65535, 0, 37, 0, 0, 65530, 5, 0, 65530, 6, 0, 65530, 7, 0, 65530, 8, 0, 65530, 9, 0, 65530, 10, 0, 65530, 11, 0, 65531, 5, 0, 65531, 6, 0, 65531, 7, 0, 65531, 8, 0, 65531, 9, 0, 65531, 10, 0, 65531, 11, 0, 65532, 5, 0, 65532, 6, 0, 65532, 7, 0, 65532, 8, 0, 65532, 9, 0, 65532, 10, 0, 65532, 11, 0, 65533, 5, 0, 65533, 6, 0, 65533, 7, 0, 65533, 8, 0, 65533, 9, 0, 65533, 10, 0, 65533, 11, 0, 65534, 5, 0, 65534, 6, 0, 65534, 7, 0, 65534, 8, 0, 65534, 9, 0, 65534, 10, 0, 65534, 11, 0, 65535, 5, 0, Line truncated
|
||||
"cells": PackedInt32Array(0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 0, 65535, 0, 0, 65534, 0, 0, 65533, 0, 0, 65532, 0, 0, 65531, 0, 0, 65530, 0, 1, 65529, 0, 2, 65529, 0, 3, 65529, 0, 3, 65530, 0, 4, 65530, 0, 5, 65530, 0, 5, 65531, 0, 5, 65532, 0, 5, 65533, 0, 5, 65534, 0, 5, 65535, 0, 4, 65535, 0, 3, 65535, 0, 2, 65535, 0, 2, 65534, 0, 1, 65534, 0, 2, 65533, 0, 3, 65533, 0, 4, 65534, 0, 3, 65534, 0, 1, 65535, 0, 65535, 0, 0, 2, 65532, 0, 1, 65532, 0, 1, 65531, 0, 1, 65530, 0, 1, 65533, 0, 4, 65533, 0, 3, 65532, 0, 3, 65531, 0, 2, 65531, 0, 2, 65530, 0, 4, 65532, 0, 4, 65531, 0, 4, 65529, 0, 5, 65529, 0, 0, 65529, 0, 65535, 65529, 0, 65534, 65529, 0, 65532, 65530, 0, 65531, 65531, 0, 65530, 65531, 0, 65530, 65532, 0, 65530, 65535, 0, 65530, 0, 0, 65531, 0, 0, 65534, 0, 0, 65534, 65535, 0, 65534, 65534, 0, 65533, 65534, 0, 65532, 65534, 0, 65531, 65534, 0, 65531, 65535, 0, 65532, 0, 0, 65533, 0, 0, 65532, 65535, 0, 65533, 65535, 0, 65535, 65535, 0, 65533, 65533, 0, 65534, 65533, 0, 65534, 65532, 0, 65534, 65531, 0, 65535, 65533, 0, 65535, 65532, 0, 65535, 65531, 0, 65535, 65530, 0, 65535, 65534, 0, 65532, 65533, 0, 65531, 65533, 0, 65530, 65534, 0, 65530, 65533, 0, 65531, 65532, 0, 65532, 65531, 0, 65534, 65530, 0, 65533, 65530, 0, 65533, 65531, 0, 65533, 65532, 0, 65532, 65532, 0, 65533, 65529, 0, 65532, 65529, 0, 65531, 65529, 0, 65530, 65529, 0, 65530, 65530, 0, 65531, 65530, 0, 131066, 0, 2, 131067, 0, 2, 131068, 0, 2, 131069, 0, 2, 131070, 0, 2, 131071, 0, 2, 65536, 0, 2, 65537, 0, 2, 65538, 0, 2, 65539, 0, 2, 65540, 0, 2, 65541, 0, 2, 65541, 65535, 2, 65541, 65534, 2, 65541, 65533, 2, 65541, 65532, 2, 65541, 65531, 2, 65541, 65530, 2, 65541, 65529, 2, 65540, 65529, 2, 65539, 65529, 2, 65538, 65529, 2, 65537, 65529, 2, 131070, 65529, 2, 131069, 65529, 2, 131068, 65529, 2, 131067, 65529, 2, 131066, 65529, 2, 131066, 65530, 2, 131066, 65531, 2, 131066, 65534, 2, 131066, 65535, 2, 10, 65529, 0, 10, 65530, 0, 10, 65531, 0, 10, 65532, 0, 10, 65533, 0, 10, 65534, 0, 10, 65535, 0, 10, 0, 0, 11, 0, 0, 12, 0, 0, 13, 0, 0, 14, 0, 0, 15, 0, 0, 16, 0, 0, 17, 0, 0, 18, 0, 0, 19, 0, 0, 20, 0, 0, 21, 0, 0, 21, 65535, 0, 21, 65534, 0, 21, 65533, 0, 21, 65532, 0, 21, 65531, 0, 21, 65530, 0, 21, 65529, 0, 20, 65529, 0, 19, 65529, 0, 18, 65529, 0, 17, 65529, 0, 16, 65529, 0, 15, 65529, 0, 14, 65529, 0, 13, 65529, 0, 12, 65529, 0, 11, 65529, 0, 11, 65530, 0, 11, 65531, 0, 11, 65532, 0, 11, 65533, 0, 11, 65534, 0, 11, 65535, 0, 12, 65535, 0, 15, 65535, 0, 16, 65535, 0, 17, 65535, 0, 18, 65535, 0, 19, 65535, 0, 20, 65535, 0, 20, 65534, 0, 20, 65533, 0, 20, 65532, 0, 20, 65531, 0, 20, 65530, 0, 19, 65530, 0, 18, 65530, 0, 17, 65530, 0, 16, 65530, 0, 15, 65530, 0, 14, 65530, 0, 13, 65530, 0, 12, 65530, 0, 12, 65531, 0, 12, 65532, 0, 12, 65533, 0, 12, 65534, 0, 13, 65535, 0, 14, 65535, 0, 14, 65534, 0, 13, 65533, 0, 13, 65532, 0, 13, 65531, 0, 14, 65531, 0, 15, 65531, 0, 16, 65531, 0, 16, 65532, 0, 17, 65532, 0, 18, 65532, 0, 19, 65532, 0, 19, 65531, 0, 19, 65533, 0, 18, 65533, 0, 17, 65534, 0, 16, 65534, 0, 15, 65534, 0, 13, 65534, 0, 18, 65534, 0, 19, 65534, 0, 14, 65533, 0, 14, 65532, 0, 15, 65533, 0, 16, 65533, 0, 17, 65533, 0, 15, 65532, 0, 17, 65531, 0, 18, 65531, 0, 26, 0, 0, 37, 65529, 0, 36, 65529, 0, 35, 65529, 0, 34, 65529, 0, 33, 65529, 0, 32, 65529, 0, 31, 65529, 0, 31, 65530, 0, 30, 65530, 0, 29, 65530, 0, 30, 65529, 0, 29, 65529, 0, 28, 65529, 0, 27, 65529, 0, 26, 65529, 0, 26, 65530, 0, 26, 65531, 0, 26, 65532, 0, 26, 65533, 0, 26, 65534, 0, 26, 65535, 0, 27, 65530, 0, 27, 65531, 0, 27, 65532, 0, 27, 65533, 0, 27, 65534, 0, 27, 65535, 0, 27, 0, 0, 28, 65530, 0, 28, 65531, 0, 28, 65532, 0, 28, 65533, 0, 28, 65534, 0, 28, 65535, 0, 28, 0, 0, 29, 65531, 0, 29, 65532, 0, 29, 65533, 0, 29, 65534, 0, 29, 65535, 0, 29, 0, 0, 30, 65531, 0, 30, 65532, 0, 30, 65533, 0, 30, 65534, 0, 30, 65535, 0, 30, 0, 0, 31, 65531, 0, 31, 65532, 0, 31, 65533, 0, 31, 65534, 0, 31, 65535, 0, 31, 0, 0, 32, 65530, 0, 32, 65531, 0, 32, 65532, 0, 32, 65533, 0, 32, 65534, 0, 32, 65535, 0, 32, 0, 0, 33, 65530, 0, 33, 65531, 0, 33, 65532, 0, 33, 65533, 0, 33, 65534, 0, 33, 65535, 0, 33, 0, 0, 34, 65530, 0, 34, 65531, 0, 34, 65532, 0, 34, 65533, 0, 34, 65534, 0, 34, 65535, 0, 34, 0, 0, 35, 65530, 0, 35, 65531, 0, 35, 65532, 0, 35, 65533, 0, 35, 65534, 0, 35, 65535, 0, 35, 0, 0, 36, 65530, 0, 36, 65531, 0, 36, 65532, 0, 36, 65533, 0, 36, 65534, 0, 36, 65535, 0, 36, 0, 0, 37, 65530, 0, 37, 65531, 0, 37, 65532, 0, 37, 65533, 0, 37, 65534, 0, 37, 65535, 0, 37, 0, 0, 65530, 5, 0, 65530, 6, 0, 65530, 7, 0, 65530, 8, 0, 65530, 9, 0, 65530, 10, 0, 65530, 11, 0, 65531, 5, 0, 65531, 6, 0, 65531, 7, 0, 65531, 8, 0, 65531, 9, 0, 65531, 10, 0, 65531, 11, 0, 65532, 5, 0, 65532, 6, 0, 65532, 7, 0, 65532, 8, 0, 65532, 9, 0, 65532, 10, 0, 65532, 11, 0, 65533, 5, 0, 65533, 6, 0, 65533, 7, 0, 65533, 8, 0, 65533, 9, 0, 65533, 10, 0, 65533, 11, 0, 65534, 5, 0, 65534, 6, 0, 65534, 7, 0, 65534, 8, 0, 65534, 9, 0, 65534, 10, 0, 65534, 11, 0, 65535, 5, 0, Line truncated
|
||||
}
|
||||
metadata/_editor_floor_ = Vector3(0, 1, 0)
|
||||
metadata/_editor_floor_ = Vector3(0, 2, 0)
|
||||
|
||||
[node name="OmniLight3D_white" type="OmniLight3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, -3)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=16 format=3 uid="uid://c0uk51mh24sl6"]
|
||||
[gd_scene load_steps=13 format=3 uid="uid://c0uk51mh24sl6"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cgdlowfuuorvi" path="res://player.tscn" id="1_wmc81"]
|
||||
[ext_resource type="PackedScene" uid="uid://cjd40tsurltut" path="res://addons/platformer-assets/block-grass-large.glb" id="2_6nhbe"]
|
||||
@@ -10,18 +10,9 @@
|
||||
[ext_resource type="Script" uid="uid://bkv7t4hw21byg" path="res://addons/simple-portal-system/scripts/simple_portal_teleport.gd" id="8_kco3g"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5x7fmpwck335" path="res://hud.tscn" id="9_afarl"]
|
||||
|
||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_wmc81"]
|
||||
sky_top_color = Color(0.258811, 0.450027, 0.718675, 1)
|
||||
sky_horizon_color = Color(0.547352, 0.669607, 0.794345, 1)
|
||||
ground_bottom_color = Color(0.27, 0.27, 0.27, 1)
|
||||
|
||||
[sub_resource type="Sky" id="Sky_6nhbe"]
|
||||
sky_material = SubResource("ProceduralSkyMaterial_wmc81")
|
||||
|
||||
[sub_resource type="Environment" id="Environment_7knre"]
|
||||
background_mode = 2
|
||||
background_mode = 1
|
||||
background_color = Color(0.590126, 0.615058, 0.699408, 1)
|
||||
sky = SubResource("Sky_6nhbe")
|
||||
glow_enabled = true
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_1wwjl"]
|
||||
@@ -30,9 +21,6 @@ size = Vector3(2, 1, 2)
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_2wcgd"]
|
||||
size = Vector3(2, 2.5, 8.79824)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_wmc81"]
|
||||
size = Vector3(2, 2, 0.5)
|
||||
|
||||
[node name="Main" type="Node3D"]
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||
@@ -276,7 +264,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.44316, 1, 0.59875)
|
||||
transform = Transform3D(-0.896199, 0, 3.34466, 0, 3.46265, 0, -3.34466, 0, -0.896199, -3.34096, 1, -5.4095)
|
||||
|
||||
[node name="P_bottom" type="MeshInstance3D" parent="." node_paths=PackedStringArray("exit_portal")]
|
||||
transform = Transform3D(-20, -1.74846e-06, -3.82137e-15, 0, -8.74228e-07, 1, -1.74846e-06, 20, 4.37114e-08, 0, -4.28944, 0)
|
||||
transform = Transform3D(-20, -1.74846e-06, -3.82137e-15, 0, -8.74228e-07, 1, -1.74846e-06, 20, 4.37114e-08, 0, -15, 0)
|
||||
layers = 2
|
||||
cast_shadow = 0
|
||||
mesh = ExtResource("6_21xnk")
|
||||
@@ -298,7 +286,7 @@ transform = Transform3D(1, 0, 0, 0, 1, -2.88658e-14, 0, 7.16227e-12, 1, 0, -3.55
|
||||
shape = SubResource("BoxShape3D_2wcgd")
|
||||
|
||||
[node name="P_top" type="MeshInstance3D" parent="." node_paths=PackedStringArray("exit_portal")]
|
||||
transform = Transform3D(20, 0, 0, 0, -8.74228e-07, -1.1, 0, 20, -4.80825e-08, 0, 10.7101, 0)
|
||||
transform = Transform3D(20, 0, 0, 0, -8.74228e-07, -1.1, 0, 20, -4.80825e-08, 0, 15, 0)
|
||||
layers = 2
|
||||
cast_shadow = 0
|
||||
mesh = ExtResource("6_21xnk")
|
||||
@@ -306,52 +294,10 @@ script = ExtResource("7_8mrlp")
|
||||
vertical_viewport_resolution = 1080
|
||||
disable_viewport_distance = 55.0
|
||||
destroy_disabled_viewport = false
|
||||
fade_out_distance_max = 2000.0
|
||||
fade_out_distance_min = 500.0
|
||||
fade_out_distance_max = 50.0
|
||||
fade_out_distance_min = 40.0
|
||||
fade_out_color = Color(0.590126, 0.615058, 0.699408, 1)
|
||||
exit_cull_mask = 1048573
|
||||
exit_portal = NodePath("../P_bottom")
|
||||
|
||||
[node name="HUD" parent="." instance=ExtResource("9_afarl")]
|
||||
|
||||
[node name="Portal_red" type="MeshInstance3D" parent="." node_paths=PackedStringArray("exit_portal")]
|
||||
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 1.7273, 2, 4.21386)
|
||||
cast_shadow = 0
|
||||
mesh = ExtResource("6_21xnk")
|
||||
skeleton = NodePath("")
|
||||
script = ExtResource("7_8mrlp")
|
||||
vertical_viewport_resolution = 1080
|
||||
disable_viewport_distance = 32.0
|
||||
fade_out_distance_max = 30.0
|
||||
fade_out_distance_min = 28.0
|
||||
fade_out_color = Color(0, 0, 0, 1)
|
||||
exit_cull_mask = 1048567
|
||||
exit_portal = NodePath("../Portal_orange")
|
||||
|
||||
[node name="Teleport" type="Area3D" parent="Portal_red"]
|
||||
script = ExtResource("8_kco3g")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Portal_red/Teleport"]
|
||||
transform = Transform3D(1, 0, 4.72511e-13, 0, 1, 0, -4.72511e-13, 0, 1, 0, 0, -0.250244)
|
||||
shape = SubResource("BoxShape3D_wmc81")
|
||||
|
||||
[node name="Portal_orange" type="MeshInstance3D" parent="." node_paths=PackedStringArray("exit_portal")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.22028, 2, -4.15372)
|
||||
cast_shadow = 0
|
||||
mesh = ExtResource("6_21xnk")
|
||||
skeleton = NodePath("")
|
||||
script = ExtResource("7_8mrlp")
|
||||
vertical_viewport_resolution = 1080
|
||||
disable_viewport_distance = 32.0
|
||||
fade_out_distance_max = 30.0
|
||||
fade_out_distance_min = 28.0
|
||||
fade_out_color = Color(0, 0, 0, 1)
|
||||
exit_cull_mask = 1048567
|
||||
exit_portal = NodePath("../Portal_red")
|
||||
|
||||
[node name="Teleport" type="Area3D" parent="Portal_orange"]
|
||||
script = ExtResource("8_kco3g")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Portal_orange/Teleport"]
|
||||
transform = Transform3D(1, 0, 4.72511e-13, 0, 1, 0, -4.72511e-13, 0, 1, 0, 0, -0.250244)
|
||||
shape = SubResource("BoxShape3D_wmc81")
|
||||
@@ -16,3 +16,4 @@ func _ready() -> void:
|
||||
for p in get_tree().get_nodes_in_group("portals"):
|
||||
if p is Portal:
|
||||
p.exit_environment = adapted_env
|
||||
|
||||
+4
-4
@@ -20,6 +20,10 @@ config/icon="res://icon.svg"
|
||||
window/size/viewport_width=1920
|
||||
window/size/viewport_height=1080
|
||||
|
||||
[editor_plugins]
|
||||
|
||||
enabled=PackedStringArray("res://addons/portal_gizmos/plugin.cfg")
|
||||
|
||||
[input]
|
||||
|
||||
move_left={
|
||||
@@ -49,7 +53,3 @@ move_back={
|
||||
3d_render/layer_2="Portals"
|
||||
3d_render/layer_3="Visible only in portals"
|
||||
3d_render/layer_4="Visible only in person"
|
||||
|
||||
[rendering]
|
||||
|
||||
anti_aliasing/quality/msaa_3d=2
|
||||
Reference in new issue
Block a user