Interaction basics
This commit is contained in:
parent
3d81c4af5f
commit
345acc8079
7 changed files with 79 additions and 14 deletions
22
scenes/camera_3d.tscn
Normal file
22
scenes/camera_3d.tscn
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://c2vxq6kqhris0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://crjao0jjv5yqs" path="res://src/drag/draggable_camera.gd" id="1_v4apc"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_hflkp"]
|
||||
radius = 0.1
|
||||
height = 10.5
|
||||
|
||||
[node name="Camera3D" type="Camera3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.86602545, 0.5, 0, -0.5, 0.8660253, 0, 0, 0)
|
||||
script = ExtResource("1_v4apc")
|
||||
|
||||
[node name="DragRaycast" type="RayCast3D" parent="."]
|
||||
target_position = Vector3(0, 0, -10)
|
||||
|
||||
[node name="InteractionArea" type="Area3D" parent="."]
|
||||
collision_layer = 0
|
||||
collision_mask = 4
|
||||
|
||||
[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)
|
||||
shape = SubResource("CapsuleShape3D_hflkp")
|
||||
|
|
@ -9,6 +9,7 @@ radius = 0.1
|
|||
height = 0.9921875
|
||||
|
||||
[node name="Flask" type="Area3D"]
|
||||
collision_layer = 5
|
||||
script = ExtResource("1_0xufn")
|
||||
|
||||
[node name="DragArea" type="CollisionShape3D" parent="."]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://c7r4rhgj3ucao"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://crjao0jjv5yqs" path="res://src/drag/draggable_camera.gd" id="1_hem3r"]
|
||||
[ext_resource type="PackedScene" uid="uid://c2vxq6kqhris0" path="res://scenes/camera_3d.tscn" id="1_hflkp"]
|
||||
[ext_resource type="PackedScene" uid="uid://dfxlr4svnsdyx" path="res://scenes/ui.tscn" id="3_hflkp"]
|
||||
[ext_resource type="Environment" uid="uid://clgblxkcf822n" path="res://assets/Environment.tres" id="8_4kvtl"]
|
||||
|
||||
|
|
@ -15,12 +15,8 @@ size = Vector3(4, 1, 2)
|
|||
transform = Transform3D(2.4088485, 0, 0, 0, 1, 0, 0, 0, 2.8214846, 0, 0, 0)
|
||||
mesh = SubResource("BoxMesh_cbcd7")
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.86602545, 0.5, 0, -0.5, 0.8660253, -1.236948, 2.5364435, 3.1829531)
|
||||
script = ExtResource("1_hem3r")
|
||||
|
||||
[node name="DragRaycast" type="RayCast3D" parent="Camera3D"]
|
||||
target_position = Vector3(0, 0, -10)
|
||||
[node name="Camera3D" parent="." instance=ExtResource("1_hflkp")]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.86602545, 0.49999994, 0, -0.49999997, 0.8660254, -1.236948, 2.5364435, 3.1829531)
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.8403207, 0.5420896, 0, -0.5420896, 0.8403207, 0, 1.9293891, 0)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://cw6v8kbi76qak"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://cw6v8kbi76qak"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bjnv2g1ni0525" path="res://src/drag/draggable_object.gd" id="1_o7vug"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://dddqboph2ygmw" path="res://assets/meshes/jar.res" id="2_o7vug"]
|
||||
[ext_resource type="Script" uid="uid://bl0ojhc0thk1p" path="res://src/interactible/interactible.gd" id="5_o7vug"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://dxeseuqcwne1m" path="res://assets/meshes/jar_fill.res" id="6_kfk5m"]
|
||||
[ext_resource type="Script" uid="uid://c8epd7gguvyop" path="res://src/substance_holder.gd" id="7_ymvgp"]
|
||||
|
||||
|
|
@ -13,6 +14,7 @@ height = 0.5024414
|
|||
radius = 0.22460938
|
||||
|
||||
[node name="Flask" type="Area3D"]
|
||||
collision_layer = 5
|
||||
script = ExtResource("1_o7vug")
|
||||
|
||||
[node name="Jar" type="MeshInstance3D" parent="."]
|
||||
|
|
@ -30,3 +32,7 @@ shape = SubResource("CylinderShape3D_kfk5m")
|
|||
|
||||
[node name="SubstanceData" type="Node" parent="."]
|
||||
script = ExtResource("7_ymvgp")
|
||||
|
||||
[node name="Interaction" type="ConfirmationDialog" parent="."]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("5_o7vug")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue