Player.tscn 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. loop_mode = 1
  15. tracks/0/type = "value"
  16. tracks/0/imported = false
  17. tracks/0/enabled = true
  18. tracks/0/path = NodePath("Pivot/Character:position")
  19. tracks/0/interp = 1
  20. tracks/0/loop_wrap = true
  21. tracks/0/keys = {
  22. "times": PackedFloat32Array(0.22, 0.7, 1.18),
  23. "transitions": PackedFloat32Array(0.435275, 2.21914, 1),
  24. "update": 0,
  25. "values": [Vector3(0, 0.329753, 0), Vector3(0, 0.660351, 0), Vector3(0, 0.349734, 0)]
  26. }
  27. tracks/1/type = "value"
  28. tracks/1/imported = false
  29. tracks/1/enabled = true
  30. tracks/1/path = NodePath("Pivot/Character:rotation_degrees")
  31. tracks/1/interp = 1
  32. tracks/1/loop_wrap = true
  33. tracks/1/keys = {
  34. "times": PackedFloat32Array(0.1, 0.46, 1.18),
  35. "transitions": PackedFloat32Array(0.482968, 0.535887, 1),
  36. "update": 0,
  37. "values": [Vector3(-5.0326, 0, 0), Vector3(10, 0, 0), Vector3(-10, 0, 0)]
  38. }
  39. [sub_resource type="AnimationLibrary" id="AnimationLibrary_aq6tr"]
  40. _data = {
  41. "float": SubResource("3")
  42. }
  43. [node name="Player" type="CharacterBody3D"]
  44. collision_mask = 2147483654
  45. script = ExtResource("1")
  46. [node name="Pivot" type="Node3D" parent="."]
  47. [node name="Character" parent="Pivot" instance=ExtResource("2")]
  48. transform = Transform3D(1, 0, 0, 0, 0.984808, 0.173648, 0, -0.173648, 0.984808, 0, 0.349734, 0)
  49. [node name="CollisionShape" type="CollisionShape3D" parent="."]
  50. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.771765, 0)
  51. shape = SubResource("1")
  52. [node name="MobDetector" type="Area3D" parent="."]
  53. collision_layer = 0
  54. collision_mask = 2
  55. monitorable = false
  56. [node name="CollisionShape" type="CollisionShape3D" parent="MobDetector"]
  57. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.06491, 0)
  58. shape = SubResource("2")
  59. [node name="CollisionShape2" type="CollisionShape3D" parent="MobDetector"]
  60. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.455268, 0.95, 1.1423)
  61. shape = SubResource("CylinderShape3D_76fa1")
  62. [node name="CollisionShape3" type="CollisionShape3D" parent="MobDetector"]
  63. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.716365, 0.95, 1.71889)
  64. shape = SubResource("CylinderShape3D_76fa1")
  65. [node name="CollisionShape4" type="CollisionShape3D" parent="MobDetector"]
  66. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.730546, 0.95, 1.69713)
  67. shape = SubResource("CylinderShape3D_76fa1")
  68. [node name="CollisionShape5" type="CollisionShape3D" parent="MobDetector"]
  69. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.45857, 0.95, 1.15318)
  70. shape = SubResource("CylinderShape3D_76fa1")
  71. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  72. libraries = {
  73. "": SubResource("AnimationLibrary_aq6tr")
  74. }
  75. autoplay = "float"
  76. [connection signal="body_entered" from="MobDetector" to="." method="_on_MobDetector_body_entered"]