Interaction rework

This commit is contained in:
Rendo 2025-12-19 13:23:41 +05:00
commit 72bea66082
11 changed files with 90 additions and 23 deletions

View file

@ -1,6 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://c2vxq6kqhris0"]
[gd_scene load_steps=4 format=3 uid="uid://b8edjit66j7st"]
[ext_resource type="Script" uid="uid://crjao0jjv5yqs" path="res://src/drag/draggable_camera.gd" id="1_v4apc"]
[ext_resource type="Script" uid="uid://d77lra3ar60b" path="res://src/interactible/interactible_detector.gd" id="2_nstyr"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_hflkp"]
radius = 0.1
@ -16,6 +17,7 @@ target_position = Vector3(0, 0, -10)
[node name="InteractionArea" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 4
script = ExtResource("2_nstyr")
[node name="CollisionShape3D" type="CollisionShape3D" parent="InteractionArea"]
transform = Transform3D(1, 0, 0, 0, -2.9802322e-08, -1, 0, 1, -2.9802322e-08, 0, 3.5762787e-07, -5.2500005)

View file

@ -1,16 +1,18 @@
[gd_scene load_steps=5 format=3 uid="uid://bjxjcx2qu16q5"]
[gd_scene load_steps=6 format=3 uid="uid://bjxjcx2qu16q5"]
[ext_resource type="Script" uid="uid://bjnv2g1ni0525" path="res://src/drag/draggable_object.gd" id="1_0xufn"]
[ext_resource type="PackedScene" uid="uid://b6ydpkle2ol20" path="res://assets/models/FlaskNew.glb" id="2_h7awq"]
[ext_resource type="Script" uid="uid://bl0ojhc0thk1p" path="res://src/interactible/interactible.gd" id="4_dbm1u"]
[ext_resource type="Script" uid="uid://82ettbegollp" path="res://src/inventory.gd" id="7_h7awq"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_vcwhe"]
radius = 0.1
height = 0.9921875
[node name="Flask" type="Area3D"]
[node name="Flask" type="Area3D" node_paths=PackedStringArray("interactible")]
collision_layer = 5
script = ExtResource("1_0xufn")
interactible = NodePath("Interactible")
[node name="DragArea" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
@ -24,3 +26,7 @@ unique_name_in_owner = true
script = ExtResource("7_h7awq")
open_on_top = true
metadata/_custom_type_script = "uid://82ettbegollp"
[node name="Interactible" type="ConfirmationDialog" parent="."]
script = ExtResource("4_dbm1u")
interaction_target_groups = PackedStringArray("test")

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=5 format=3 uid="uid://q1y0r2rn0qb4"]
[ext_resource type="Script" uid="uid://mjx50qh1bwv3" path="res://src/interactible/interaction_reciever.gd" id="1_auicg"]
[ext_resource type="Script" path="res://src/interactible/interaction_reciever.gd" id="1_auicg"]
[ext_resource type="Material" uid="uid://64m17act0kwu" path="res://assets/materials/mat_glass.tres" id="2_mqqtq"]
[sub_resource type="CylinderMesh" id="CylinderMesh_nql6a"]

View file

@ -13,9 +13,10 @@ resource_local_to_scene = true
height = 0.5024414
radius = 0.22460938
[node name="Flask" type="Area3D"]
[node name="Flask" type="Area3D" node_paths=PackedStringArray("interactible") groups=["test"]]
collision_layer = 5
script = ExtResource("1_o7vug")
interactible = NodePath("Interaction")
[node name="Jar" type="MeshInstance3D" parent="."]
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 0, 0)
@ -34,5 +35,4 @@ shape = SubResource("CylinderShape3D_kfk5m")
script = ExtResource("7_ymvgp")
[node name="Interaction" type="ConfirmationDialog" parent="."]
unique_name_in_owner = true
script = ExtResource("5_o7vug")