Player.tscn 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. [gd_scene load_steps=8 format=3 uid="uid://dp478jyugrn7o"]
  2. [ext_resource type="Script" path="res://Player.gd" id="1"]
  3. [ext_resource type="PackedScene" uid="uid://d0ypm0v45pwdv" path="res://art/player.glb" id="2"]
  4. [sub_resource type="SphereShape3D" id="1"]
  5. radius = 0.792278
  6. [sub_resource type="CylinderShape3D" id="2"]
  7. height = 0.1438
  8. radius = 0.907607
  9. [sub_resource type="CylinderShape3D" id="CylinderShape3D_76fa1"]
  10. height = 0.144
  11. radius = 0.2
  12. [sub_resource type="Animation" id="3"]
  13. length = 1.2
  14. tracks/0/type = "value"
  15. tracks/0/imported = false
  16. tracks/0/enabled = true
  17. tracks/0/path = NodePath("Pivot/Character:position")
  18. tracks/0/interp = 1
  19. tracks/0/loop_wrap = true
  20. tracks/0/keys = {
  21. "times": PackedFloat32Array(0.22, 0.7, 1.18),
  22. "transitions": PackedFloat32Array(0.435275, 2.21914, 1),
  23. "update": 0,
  24. "values": [Vector3(0, 0.329753, 0), Vector3(0, 0.660351, 0), Vector3(0, 0.349734, 0)]
  25. }
  26. tracks/1/type = "value"
  27. tracks/1/imported = false
  28. tracks/1/enabled = true
  29. tracks/1/path = NodePath("Pivot/Character:rotation_degrees")
  30. tracks/1/interp = 1
  31. tracks/1/loop_wrap = true
  32. tracks/1/keys = {
  33. "times": PackedFloat32Array(0.1, 0.46, 1.18),
  34. "transitions": PackedFloat32Array(0.482968, 0.535887, 1),
  35. "update": 0,
  36. "values": [Vector3(-5.0326, 0, 0), Vector3(10, 0, 0), Vector3(-10, 0, 0)]
  37. }
  38. [sub_resource type="AnimationLibrary" id="AnimationLibrary_aq6tr"]
  39. _data = {
  40. "float": SubResource("3")
  41. }
  42. [node name="Player" type="CharacterBody3D"]
  43. collision_mask = 2147483654
  44. script = ExtResource("1")
  45. [node name="Pivot" type="Node3D" parent="."]
  46. [node name="Character" parent="Pivot" instance=ExtResource("2")]
  47. transform = Transform3D(1, 0, 0, 0, 0.984808, 0.173648, 0, -0.173648, 0.984808, 0, 0.349734, 0)
  48. [node name="CollisionShape" type="CollisionShape3D" parent="."]
  49. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.771765, 0)
  50. shape = SubResource("1")
  51. [node name="MobDetector" type="Area3D" parent="."]
  52. collision_layer = 0
  53. collision_mask = 2
  54. monitorable = false
  55. [node name="CollisionShape" type="CollisionShape3D" parent="MobDetector"]
  56. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.06491, 0)
  57. shape = SubResource("2")
  58. [node name="CollisionShape2" type="CollisionShape3D" parent="MobDetector"]
  59. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.455268, 0.95, 1.1423)
  60. shape = SubResource("CylinderShape3D_76fa1")
  61. [node name="CollisionShape3" type="CollisionShape3D" parent="MobDetector"]
  62. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.716365, 0.95, 1.71889)
  63. shape = SubResource("CylinderShape3D_76fa1")
  64. [node name="CollisionShape4" type="CollisionShape3D" parent="MobDetector"]
  65. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.730546, 0.95, 1.69713)
  66. shape = SubResource("CylinderShape3D_76fa1")
  67. [node name="CollisionShape5" type="CollisionShape3D" parent="MobDetector"]
  68. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.45857, 0.95, 1.15318)
  69. shape = SubResource("CylinderShape3D_76fa1")
  70. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  71. libraries = {
  72. "": SubResource("AnimationLibrary_aq6tr")
  73. }
  74. autoplay = "float"
  75. [connection signal="body_entered" from="MobDetector" to="." method="_on_MobDetector_body_entered"]