started adding interaction system

This commit is contained in:
2024-01-17 12:24:30 +01:00
parent ee3852fec0
commit 813545dfc1
8 changed files with 166 additions and 16 deletions

View File

@@ -0,0 +1,44 @@
[gd_scene load_steps=4 format=3 uid="uid://dm8l36ephydnl"]
[ext_resource type="Script" path="res://scripts/interaction_area.gd" id="1_shkh8"]
[sub_resource type="BoxShape3D" id="BoxShape3D_xlssi"]
[sub_resource type="LabelSettings" id="LabelSettings_bc53a"]
font_size = 18
outline_size = 5
outline_color = Color(0, 0, 0, 1)
[node name="InteractionArea" type="Area3D"]
script = ExtResource("1_shkh8")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 1, 0)
shape = SubResource("BoxShape3D_xlssi")
[node name="InteractionLabel" type="CanvasLayer" parent="."]
visible = false
[node name="Control" type="Control" parent="InteractionLabel"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Label" type="Label" parent="InteractionLabel/Control"]
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_left = 7.0
offset_top = -30.0
offset_right = 127.0
offset_bottom = -7.0
grow_vertical = 0
text = "[E] Interagieren"
label_settings = SubResource("LabelSettings_bc53a")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="body_exited" from="." to="." method="_on_body_exited"]