door.tscn 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. [gd_scene load_steps=9 format=3 uid="uid://b72b3llm3ks25"]
  2. [ext_resource type="Script" path="res://door.gd" id="1_cd56o"]
  3. [sub_resource type="BoxMesh" id="BoxMesh_uwx0y"]
  4. size = Vector3(0.05, 3.25, 2.5)
  5. [sub_resource type="BoxMesh" id="BoxMesh_uj7hy"]
  6. size = Vector3(0.2, 0.2, 0.6)
  7. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_yypcp"]
  8. [sub_resource type="BoxOccluder3D" id="BoxOccluder3D_gavni"]
  9. size = Vector3(0.05, 3.3, 2.5)
  10. [sub_resource type="Animation" id="Animation_4cjd4"]
  11. length = 0.001
  12. tracks/0/type = "value"
  13. tracks/0/imported = false
  14. tracks/0/enabled = true
  15. tracks/0/path = NodePath("Pivot:rotation")
  16. tracks/0/interp = 1
  17. tracks/0/loop_wrap = true
  18. tracks/0/keys = {
  19. "times": PackedFloat32Array(0),
  20. "transitions": PackedFloat32Array(1),
  21. "update": 0,
  22. "values": [Vector3(0, 0, 0)]
  23. }
  24. [sub_resource type="Animation" id="Animation_6r4px"]
  25. resource_name = "open"
  26. tracks/0/type = "value"
  27. tracks/0/imported = false
  28. tracks/0/enabled = true
  29. tracks/0/path = NodePath("Pivot:rotation")
  30. tracks/0/interp = 1
  31. tracks/0/loop_wrap = true
  32. tracks/0/keys = {
  33. "times": PackedFloat32Array(0, 1),
  34. "transitions": PackedFloat32Array(-2, -2),
  35. "update": 0,
  36. "values": [Vector3(0, 0, 0), Vector3(0, 1.5708, 0)]
  37. }
  38. [sub_resource type="AnimationLibrary" id="AnimationLibrary_5gp0p"]
  39. _data = {
  40. "RESET": SubResource("Animation_4cjd4"),
  41. "open": SubResource("Animation_6r4px")
  42. }
  43. [node name="Door" type="Node3D"]
  44. script = ExtResource("1_cd56o")
  45. [node name="Pivot" type="Node3D" parent="."]
  46. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.7, 1.2)
  47. [node name="MeshInstance3D" type="MeshInstance3D" parent="Pivot"]
  48. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.005, -1.2)
  49. mesh = SubResource("BoxMesh_uwx0y")
  50. skeleton = NodePath("../..")
  51. [node name="MeshInstance3D" type="MeshInstance3D" parent="Pivot/MeshInstance3D"]
  52. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.2, -0.8)
  53. mesh = SubResource("BoxMesh_uj7hy")
  54. surface_material_override/0 = SubResource("StandardMaterial3D_yypcp")
  55. [node name="OccluderInstance3D" type="OccluderInstance3D" parent="."]
  56. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.7, 0)
  57. occluder = SubResource("BoxOccluder3D_gavni")
  58. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  59. libraries = {
  60. "": SubResource("AnimationLibrary_5gp0p")
  61. }
  62. [connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_player_animation_finished"]