OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-tps / scenes / teleporter / teleporter.tscn

44 lines · tscn ref:
[gd_scene load_steps=3 format=3 uid="uid://teleporter01"]

[ext_resource type="Script" path="res://scenes/teleporter/teleporter.gd" id="1"]
[ext_resource type="PackedScene" path="res://assets/models/teleporter/teleporter.glb" id="teleporter_model"]

[sub_resource type="BoxShape3D" id="BoxShape3D_hitbox"]
size = Vector3(1.0, 6.5, 6.0)

[node name="Teleporter" type="Area3D"]
collision_layer = 0
collision_mask = 1
script = ExtResource("1")

[node name="Hitbox" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.25, 0)
shape = SubResource("BoxShape3D_hitbox")

[node name="Model" parent="." instance=ExtResource("teleporter_model")]

[node name="Indicator" type="OmniLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4, 0)
light_color = Color(1, 0.5, 0, 1)
light_energy = 2.0
omni_range = 6.0
omni_attenuation = 1.5

[node name="Label3D" type="Label3D" parent="."]
; y 7.8, not 6.5. The hitbox is 6.5 tall, so the label sat exactly AT the top of
; the arch -- inside its geometry, depth-tested against it, and invisible from
; most angles. It clears the model now.
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7.8, 0)
billboard = 1
; Draw THROUGH the arch and the terrain. A signpost you can only read from the
; one angle where nothing is in front of it is not a signpost.
no_depth_test = true
render_priority = 2
outline_render_priority = 1
; Bigger on screen: 0.005 is the default and gives ~0.24 m of text, which is
; unreadable from the distance you actually spot a teleporter at.
pixel_size = 0.012
text = "Teleport"
font_size = 48
outline_size = 8