Files
godot-demo-projects/3d/squash_the_creeps/Player.tscn
Hugo Locurcio 71eea49eba Fix player and mob animations not looping in Squash the Creeps (#1020)
This was missed in the upgrade to 4.0, which reset loop mode properties
in Animation.
2024-03-06 23:08:05 +01:00

95 lines
3.1 KiB
Plaintext

[gd_scene load_steps=8 format=3 uid="uid://dp478jyugrn7o"]
[ext_resource type="Script" path="res://Player.gd" id="1"]
[ext_resource type="PackedScene" uid="uid://d0ypm0v45pwdv" path="res://art/player.glb" id="2"]
[sub_resource type="SphereShape3D" id="1"]
radius = 0.792278
[sub_resource type="CylinderShape3D" id="2"]
height = 0.1438
radius = 0.907607
[sub_resource type="CylinderShape3D" id="CylinderShape3D_76fa1"]
height = 0.144
radius = 0.2
[sub_resource type="Animation" id="3"]
length = 1.2
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Pivot/Character:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.22, 0.7, 1.18),
"transitions": PackedFloat32Array(0.435275, 2.21914, 1),
"update": 0,
"values": [Vector3(0, 0.329753, 0), Vector3(0, 0.660351, 0), Vector3(0, 0.349734, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Pivot/Character:rotation_degrees")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.1, 0.46, 1.18),
"transitions": PackedFloat32Array(0.482968, 0.535887, 1),
"update": 0,
"values": [Vector3(-5.0326, 0, 0), Vector3(10, 0, 0), Vector3(-10, 0, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_aq6tr"]
_data = {
"float": SubResource("3")
}
[node name="Player" type="CharacterBody3D"]
collision_mask = 2147483654
script = ExtResource("1")
[node name="Pivot" type="Node3D" parent="."]
[node name="Character" parent="Pivot" instance=ExtResource("2")]
transform = Transform3D(1, 0, 0, 0, 0.984808, 0.173648, 0, -0.173648, 0.984808, 0, 0.349734, 0)
[node name="CollisionShape" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.771765, 0)
shape = SubResource("1")
[node name="MobDetector" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 2
monitorable = false
[node name="CollisionShape" type="CollisionShape3D" parent="MobDetector"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.06491, 0)
shape = SubResource("2")
[node name="CollisionShape2" type="CollisionShape3D" parent="MobDetector"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.455268, 0.95, 1.1423)
shape = SubResource("CylinderShape3D_76fa1")
[node name="CollisionShape3" type="CollisionShape3D" parent="MobDetector"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.716365, 0.95, 1.71889)
shape = SubResource("CylinderShape3D_76fa1")
[node name="CollisionShape4" type="CollisionShape3D" parent="MobDetector"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.730546, 0.95, 1.69713)
shape = SubResource("CylinderShape3D_76fa1")
[node name="CollisionShape5" type="CollisionShape3D" parent="MobDetector"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.45857, 0.95, 1.15318)
shape = SubResource("CylinderShape3D_76fa1")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_aq6tr")
}
autoplay = "float"
[connection signal="body_entered" from="MobDetector" to="." method="_on_MobDetector_body_entered"]