Skip to content

Commit 743b788

Browse files
committed
chore: reintroduce hurt animation for the bat upon taking damage
1 parent 9c02601 commit 743b788

File tree

2 files changed

+36
-12
lines changed

2 files changed

+36
-12
lines changed

3d-project-completed/lessons_reference/video_16/mob/bat/bat_model.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ extends Node3D
33
@onready var animation_tree = %AnimationTree
44

55
func hurt():
6-
animation_tree.set("parameters/HurtShot/request", true)
6+
animation_tree.set("parameters/OneShot/request", true)

3d-project-completed/lessons_reference/video_16/mob/bat/bat_model.tscn

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,18 @@ tracks/1/keys = {
126126
"update": 0,
127127
"values": [Vector3(1, 1, 1)]
128128
}
129+
tracks/2/type = "value"
130+
tracks/2/imported = false
131+
tracks/2/enabled = true
132+
tracks/2/path = NodePath("Armature/Skeleton3D/bat:scale")
133+
tracks/2/interp = 1
134+
tracks/2/loop_wrap = true
135+
tracks/2/keys = {
136+
"times": PackedFloat32Array(0),
137+
"transitions": PackedFloat32Array(1),
138+
"update": 0,
139+
"values": [Vector3(1, 1, 1)]
140+
}
129141

130142
[sub_resource type="Animation" id="Animation_iqaxg"]
131143
resource_name = "hurt"
@@ -138,10 +150,22 @@ tracks/0/interp = 1
138150
tracks/0/loop_wrap = true
139151
tracks/0/keys = {
140152
"times": PackedFloat32Array(0, 0.133333, 0.266667),
141-
"transitions": PackedFloat32Array(1, 1, 1),
153+
"transitions": PackedFloat32Array(0.406126, 1.41421, 1),
142154
"update": 0,
143155
"values": [Color(1, 1, 1, 1), Color(0.768627, 0.113725, 0.239216, 1), Color(1, 1, 1, 1)]
144156
}
157+
tracks/1/type = "value"
158+
tracks/1/imported = false
159+
tracks/1/enabled = true
160+
tracks/1/path = NodePath("Armature/Skeleton3D/bat:scale")
161+
tracks/1/interp = 1
162+
tracks/1/loop_wrap = true
163+
tracks/1/keys = {
164+
"times": PackedFloat32Array(0, 0.133333, 0.266667),
165+
"transitions": PackedFloat32Array(0.406126, 1.41421, 1),
166+
"update": 0,
167+
"values": [Vector3(1, 1, 1), Vector3(1.185, 1.185, 1.185), Vector3(1, 1, 1)]
168+
}
145169

146170
[sub_resource type="AnimationLibrary" id="AnimationLibrary_guetf"]
147171
_data = {
@@ -160,7 +184,7 @@ animation = &"Idle"
160184
mix_mode = 1
161185

162186
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_bslxy"]
163-
graph_offset = Vector2(-345.6, -14)
187+
graph_offset = Vector2(-317.893, 39.6625)
164188
nodes/Hurt/node = SubResource("AnimationNodeAnimation_a0k2n")
165189
nodes/Hurt/position = Vector2(-40, 208)
166190
nodes/Idle/node = SubResource("AnimationNodeAnimation_ri8va")
@@ -173,19 +197,19 @@ node_connections = [&"OneShot", 0, &"Idle", &"OneShot", 1, &"Hurt", &"output", 0
173197
script = ExtResource("1_ppjak")
174198

175199
[node name="Skeleton3D" parent="Armature" index="0"]
176-
bones/0/position = Vector3(0, -0.0236, 0)
177-
bones/1/rotation = Quaternion(-0.0518763, 0.200934, -0.65216, 0.729124)
178-
bones/2/rotation = Quaternion(-0.181293, -0.0501275, 0.261588, 0.946674)
179-
bones/3/rotation = Quaternion(-0.139061, 0.0168387, 0.215337, 0.966441)
180-
bones/4/rotation = Quaternion(-0.0518763, -0.200934, 0.65216, 0.729124)
181-
bones/5/rotation = Quaternion(-0.181293, 0.0501275, -0.261588, 0.946674)
182-
bones/6/rotation = Quaternion(-0.139061, -0.0168387, -0.215337, 0.966441)
200+
bones/0/position = Vector3(0, 0.0236, 0)
201+
bones/1/rotation = Quaternion(0.185436, -0.00744002, -0.6376, 0.74768)
202+
bones/2/rotation = Quaternion(0.177649, 0.0781321, 0.394811, 0.898031)
203+
bones/3/rotation = Quaternion(0.138328, 0.105002, 0.361888, 0.915902)
204+
bones/4/rotation = Quaternion(0.185436, 0.00744002, 0.6376, 0.74768)
205+
bones/5/rotation = Quaternion(0.177649, -0.0781321, -0.394811, 0.898031)
206+
bones/6/rotation = Quaternion(0.138328, -0.105002, -0.361888, 0.915902)
183207
bones/7/position = Vector3(0.130992, -0.227392, -0.0878515)
184208
bones/7/rotation = Quaternion(0.261968, 0.0834552, 0.265751, 0.924005)
185-
bones/8/rotation = Quaternion(3.66535e-08, 0.618379, 0.78588, 2.24474e-08)
209+
bones/8/rotation = Quaternion(3.94755e-08, 0.65414, 0.756373, 2.47107e-08)
186210
bones/10/position = Vector3(-0.130992, -0.227392, -0.0878515)
187211
bones/10/rotation = Quaternion(0.261968, -0.0834552, -0.265751, 0.924005)
188-
bones/11/rotation = Quaternion(3.26175e-08, 0.618379, 0.78588, 4.19465e-08)
212+
bones/11/rotation = Quaternion(2.44109e-08, 0.654141, 0.756373, 3.46799e-08)
189213

190214
[node name="bat" parent="Armature/Skeleton3D" index="0"]
191215
surface_material_override/0 = ExtResource("3_uqgpt")

0 commit comments

Comments
 (0)