Added basic interaction functionality

This commit is contained in:
cblech
2024-12-20 16:28:02 +01:00
parent dc322d8943
commit 84fcec8227
11 changed files with 108 additions and 5 deletions
+20 -2
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=32 format=3 uid="uid://clxs6xfesi82s"]
[gd_scene load_steps=34 format=3 uid="uid://clxs6xfesi82s"]
[ext_resource type="Texture2D" uid="uid://cg1cxmqbo1pa" path="res://graphics/mockups/darktree1.png" id="1_u6vd6"]
[ext_resource type="Texture2D" uid="uid://fcm6etmmj65d" path="res://graphics/mockups/darktree2.png" id="2_tcvf7"]
@@ -16,6 +16,7 @@
[ext_resource type="Texture2D" uid="uid://bcah7lrg2oae1" path="res://graphics/testingground/IveSeenSomeShit.png" id="13_gcssn"]
[ext_resource type="Texture2D" uid="uid://dj1syhq0dmf3p" path="res://graphics/testingground/Doll.png" id="14_qxv15"]
[ext_resource type="Texture2D" uid="uid://bnb3bjk274vgn" path="res://graphics/testingground/mushroom4.png" id="16_5f343"]
[ext_resource type="Script" path="res://scripts/dialogic_starter.gd" id="16_frq8l"]
[ext_resource type="Texture2D" uid="uid://0oy8by6pd2wg" path="res://graphics/testingground/mushroom5.png" id="17_odxxd"]
[ext_resource type="Texture2D" uid="uid://b1h55mnc1giqu" path="res://graphics/testingground/mushroom6.png" id="18_i7vrp"]
[ext_resource type="Texture2D" uid="uid://c5lsjern0iqmc" path="res://graphics/testingground/mushroom7.png" id="19_yb8aa"]
@@ -27,6 +28,7 @@
[ext_resource type="Texture2D" uid="uid://63rgrra0tdef" path="res://graphics/testingground/chestnut2.png" id="25_j83yj"]
[ext_resource type="Texture2D" uid="uid://cygt1j1m0vpqg" path="res://graphics/mockups/field_placeholder.png" id="26_7nyv4"]
[ext_resource type="PackedScene" uid="uid://de2fn2m114eaw" path="res://scenes/props/Player3D.tscn" id="27_mqdni"]
[ext_resource type="PackedScene" uid="uid://ob04y3syvo0e" path="res://scenes/props/interaction_area.tscn" id="28_h5ibf"]
[sub_resource type="PlaneMesh" id="PlaneMesh_8dxh5"]
@@ -1252,12 +1254,26 @@ billboard = 1
shaded = true
texture = ExtResource("13_gcssn")
[node name="player4" type="Sprite3D" parent="."]
[node name="semi_cat" type="Sprite3D" parent="."]
transform = Transform3D(0.04, 0, 0, 0, 0.04, 0, 0, 0, 0.04, -0.568754, 0.116035, -0.275782)
billboard = 1
shaded = true
texture = ExtResource("14_qxv15")
[node name="InteractionArea" parent="semi_cat" instance=ExtResource("28_h5ibf")]
transform = Transform3D(2.875, 0, 0, 0, 2.875, 0, 0, 0, 2.875, 0, -1.698, 0)
[node name="Dialogic" type="Node" parent="semi_cat"]
script = ExtResource("16_frq8l")
[node name="Label3D" type="Label3D" parent="semi_cat"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.92228, 1.02561, -4.76837e-07)
billboard = 1
no_depth_test = true
alpha_antialiasing_mode = 1
text = "Cat ->"
font_size = 188
[node name="details" type="Node" parent="."]
[node name="mushroom" type="Sprite3D" parent="details"]
@@ -1360,3 +1376,5 @@ texture = ExtResource("26_7nyv4")
[node name="Player3d" parent="." instance=ExtResource("27_mqdni")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.110292, 0.0067718, 0.0825893)
[connection signal="interacted" from="semi_cat/InteractionArea" to="semi_cat/Dialogic" method="open" binds= ["semi_cat"]]
+2
View File
@@ -11,6 +11,8 @@ height = 0.234557
[node name="Player3d" type="Node3D"]
[node name="CharacterBody3D" type="CharacterBody3D" parent="."]
collision_layer = 16
collision_mask = 17
script = ExtResource("1_08wm4")
SPEED = 0.5
+16
View File
@@ -0,0 +1,16 @@
[gd_scene load_steps=3 format=3 uid="uid://ob04y3syvo0e"]
[ext_resource type="Script" path="res://scripts/interaction_area.gd" id="1_26v5g"]
[sub_resource type="SphereShape3D" id="SphereShape3D_i8sim"]
radius = 1.0
[node name="InteractionArea" type="Node3D"]
script = ExtResource("1_26v5g")
[node name="Area3D" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 16
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
shape = SubResource("SphereShape3D_i8sim")