Added interactable

This commit is contained in:
jonathan
2026-01-27 12:31:37 +01:00
parent 68e86405c9
commit 6a5494a3de
11 changed files with 86 additions and 7 deletions
+20 -7
View File
@@ -1,17 +1,17 @@
[gd_scene load_steps=4 format=3 uid="uid://gq33ysuit61b"]
[gd_scene load_steps=7 format=3 uid="uid://gq33ysuit61b"]
[ext_resource type="PackedScene" uid="uid://cc1m2a1obsyn4" path="res://addons/fpc/character.tscn" id="1_grf6e"]
[ext_resource type="PackedScene" uid="uid://c70o7nk6wxcmx" path="res://models/UndertakerBlockout.fbx" id="2_gfayn"]
[ext_resource type="PackedScene" uid="uid://be7u1kn41g2ww" path="res://addons/interaction/interactable.tscn" id="3_u0nvw"]
[ext_resource type="PackedScene" uid="uid://bxuveo0hlwy33" path="res://prefabs/character.tscn" id="4_tedjo"]
[ext_resource type="Script" uid="uid://b1pyctfbd0wvg" path="res://scenes/debug_printer.gd" id="4_ui586"]
[sub_resource type="BoxShape3D" id="BoxShape3D_gfayn"]
size = Vector3(12.2438965, 0.48779297, 13.901489)
[node name="BlockoutRoom" type="Node3D"]
[sub_resource type="BoxShape3D" id="BoxShape3D_ui586"]
size = Vector3(0.24987793, 1, 1)
[node name="Character" parent="." instance=ExtResource("1_grf6e")]
transform = Transform3D(1.2, 0, 0, 0, 1.2, 0, 0, 0, 1.2, 1.96156, 0.12873119, -1.2073363)
base_speed = 2.0
acceleration = 5.0
[node name="BlockoutRoom" type="Node3D"]
[node name="UndertakerBlockout" parent="." instance=ExtResource("2_gfayn")]
@@ -26,3 +26,16 @@ transform = Transform3D(0.7260458, 0.59701693, -0.34121642, 0.64276195, -0.41287
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.1646729, -0.25610352, 1.5601196)
shape = SubResource("BoxShape3D_gfayn")
[node name="Interactable" parent="." instance=ExtResource("3_u0nvw")]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Interactable"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.1487448, 1.3621653, -0.7917821)
shape = SubResource("BoxShape3D_ui586")
[node name="DebugPrinter" type="Node" parent="."]
script = ExtResource("4_ui586")
[node name="Character" parent="." instance=ExtResource("4_tedjo")]
[connection signal="on_hit" from="Interactable" to="DebugPrinter" method="_on_interactable_on_hit"]