Proper RESET animations

This commit is contained in:
2024-02-29 19:53:23 -08:00
parent eee84d84cc
commit 712836f13c
2 changed files with 78 additions and 28 deletions

View File

@ -74,6 +74,7 @@ func _ready():
# Reset the camera position # Reset the camera position
HEADBOB_ANIMATION.play("RESET") HEADBOB_ANIMATION.play("RESET")
JUMP_ANIMATION.play("RESET") JUMP_ANIMATION.play("RESET")
CROUCH_ANIMATION.play("RESET")
func _physics_process(delta): func _physics_process(delta):

View File

@ -14,33 +14,6 @@ material = SubResource("StandardMaterial3D_kp17n")
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_uy03j"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_uy03j"]
[sub_resource type="Animation" id="Animation_pqev3"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Mesh:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 1, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Head:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 1.5, 0)]
}
[sub_resource type="Animation" id="Animation_5ec5e"] [sub_resource type="Animation" id="Animation_5ec5e"]
resource_name = "crouch" resource_name = "crouch"
length = 0.2 length = 0.2
@ -105,9 +78,73 @@ tracks/4/keys = {
"values": [Vector3(0, 1.5, 0), Vector3(0, 1.12508, 0)] "values": [Vector3(0, 1.5, 0), Vector3(0, 1.12508, 0)]
} }
[sub_resource type="Animation" id="Animation_j8cx7"]
resource_name = "RESET"
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Mesh:scale")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(1, 1, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Collision:scale")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(1, 1, 1)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Mesh:position")
tracks/2/interp = 2
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 1, 0)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Collision:position")
tracks/3/interp = 2
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 1, 0)]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Head:position")
tracks/4/interp = 2
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 1.5, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5e5t5"] [sub_resource type="AnimationLibrary" id="AnimationLibrary_5e5t5"]
_data = { _data = {
"RESET": SubResource("Animation_pqev3"), "RESET": SubResource("Animation_j8cx7"),
"crouch": SubResource("Animation_5ec5e") "crouch": SubResource("Animation_5ec5e")
} }
@ -246,6 +283,18 @@ tracks/0/keys = {
"update": 0, "update": 0,
"values": [Vector3(0.0349066, 0, 0)] "values": [Vector3(0.0349066, 0, 0)]
} }
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0)]
}
[sub_resource type="Animation" id="Animation_s07ye"] [sub_resource type="Animation" id="Animation_s07ye"]
resource_name = "jump" resource_name = "jump"