Turn off portal gizmo bezier curve

This commit is contained in:
Vojtěch Struhár 2025-02-25 19:14:29 +01:00
parent a50449c71b
commit 7266a89b60
7 changed files with 6 additions and 5 deletions

View File

@ -56,6 +56,6 @@ Mám v plánu udělat texture masku pro tvarování protálů. S házením stín
:exclamation: Tohle asi nebude fungovat kvůli té prohlubni :exclamation: Tohle asi nebude fungovat kvůli té prohlubni
- Kdybys měl oblouk nahoře, tak nemůžeš jenom tak clipnout obdélníkový portál. Kdyby byl plochý, tak jo. Ale takhle. - Kdybys měl oblouk nahoře, tak nemůžeš jenom tak clipnout obdélníkový portál. Kdyby byl plochý, tak jo. Ale takhle bude ten okraj nahoře jakoby zabořený a nebude to pěkné (asi). Zvlášť v rožkách.
:question: Tohle asi řeší tenký box s **culling- off** jak měl Sebastian ve svém Unity videu. Akorát to žere trochu renderingu.. ale v porovnání s X kamerama navíc je to asi fuk. :question: Tohle asi řeší tenký box s **culling- off** jak měl Sebastian ve svém Unity videu. Akorát to žere trochu renderingu.. ale v porovnání s X kamerama navíc je to asi fuk.

View File

@ -23,8 +23,10 @@ func _ready():
func _on_area_entered(area: Area3D) -> void: func _on_area_entered(area: Area3D) -> void:
if area.has_meta("teleportable_root"): if area.has_meta("teleportable_root"):
var root:Node3D = area.get_node(area.get_meta("teleportable_root")) var root:Node3D = area.get_node(area.get_meta("teleportable_root"))
print("[%f] Teleporting %s to %s" % [roundi(Time.get_ticks_msec() / 100) / 10.0, root.name, _parent_portal.exit_portal.name])
root.global_transform = _parent_portal.real_to_exit_transform(root.global_transform) root.global_transform = _parent_portal.real_to_exit_transform(root.global_transform)
func _on_body_entered(body: Node3D) -> void: func _on_body_entered(body: Node3D) -> void:
if body.get_meta("teleportable", false) == true: if body.get_meta("teleportable", false) == true:
body.global_transform = _parent_portal.real_to_exit_transform(body.global_transform) body.global_transform = _parent_portal.real_to_exit_transform(body.global_transform)
print("Teleporting %s to %s" % [body.name, _parent_portal.exit_portal.name])

2
hud.gd
View File

@ -4,7 +4,7 @@ extends VBoxContainer
func _ready() -> void: func _ready() -> void:
toggle_hud() # This should hide the HUD by default toggle_hud() # This should hide the HUD by default
func _process(delta: float) -> void: func _process(_delta: float) -> void:
if Input.is_action_just_pressed("ui_cancel"): if Input.is_action_just_pressed("ui_cancel"):
toggle_hud() toggle_hud()

View File

@ -135,4 +135,5 @@ base = NodePath("../WorldEnvironment")
[node name="ProceduralMeshMaker" parent="." node_paths=PackedStringArray("portal") instance=ExtResource("8_vdsn8")] [node name="ProceduralMeshMaker" parent="." node_paths=PackedStringArray("portal") instance=ExtResource("8_vdsn8")]
width = 2.0 width = 2.0
shadow_mesh = true
portal = NodePath("../Portal_orange") portal = NodePath("../Portal_orange")

View File

@ -64,7 +64,6 @@ script = ExtResource("1_ksg6r")
height = 2.6 height = 2.6
width = 2.0 width = 2.0
indent = 0.133 indent = 0.133
shadow_mesh = true
portal = NodePath("../MeshInstance3D") portal = NodePath("../MeshInstance3D")
portal_material = ExtResource("1_dn1le") portal_material = ExtResource("1_dn1le")

View File

@ -4,4 +4,3 @@
[node name="ProceduralMeshMaker" type="Node"] [node name="ProceduralMeshMaker" type="Node"]
script = ExtResource("1_1a4ua") script = ExtResource("1_1a4ua")
shadow_mesh = null

View File

@ -22,7 +22,7 @@ window/size/viewport_height=1080
[editor_plugins] [editor_plugins]
enabled=PackedStringArray("res://addons/inspector_buttons/plugin.cfg", "res://addons/portal_gizmos/plugin.cfg") enabled=PackedStringArray("res://addons/inspector_buttons/plugin.cfg")
[input] [input]