Skip to content

Commit 9c02601

Browse files
committed
fix: work around bug with animation libraries causing bat model to disappear
1 parent 3af56f8 commit 9c02601

File tree

2 files changed

+55
-85
lines changed

2 files changed

+55
-85
lines changed

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

Lines changed: 54 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[gd_scene load_steps=10 format=3 uid="uid://12e7gwo50sef"]
1+
[gd_scene load_steps=12 format=3 uid="uid://12e7gwo50sef"]
22

33
[ext_resource type="Script" path="res://lessons_reference/video_16/mob/bat/bat_model.gd" id="1_ppjak"]
44
[ext_resource type="PackedScene" uid="uid://cb4uxoephhm18" path="res://mob/bat/bat_model.glb" id="1_tpnu0"]
@@ -99,33 +99,68 @@ tracks/12/path = NodePath("Armature/Skeleton3D:foot_2.R")
9999
tracks/12/interp = 1
100100
tracks/12/loop_wrap = true
101101
tracks/12/keys = PackedFloat32Array(0, 1, 2.54238e-08, 0.690882, 0.722967, 3.63776e-08, 0.0333333, 1, 2.11774e-08, 0.673013, 0.739631, 4.78233e-08, 0.0666667, 1, 2.49787e-08, 0.650774, 0.759271, 3.23632e-08, 0.133333, 1, 3.67218e-08, 0.60042, 0.799685, 4.70949e-08, 0.166667, 1, 2.63662e-08, 0.576432, 0.817145, 4.85832e-08, 0.2, 1, 2.33095e-08, 0.556296, 0.830984, 3.56522e-08, 0.233333, 1, 2.52265e-08, 0.542441, 0.840094, 4.39632e-08, 0.3, 1, 2.52265e-08, 0.542441, 0.840094, 4.39632e-08, 0.333333, 1, 2.31416e-08, 0.556296, 0.830984, 3.54843e-08, 0.366667, 1, 2.63662e-08, 0.576432, 0.817145, 4.85832e-08, 0.4, 1, 3.15666e-08, 0.60042, 0.799685, 3.09642e-08, 0.466667, 1, 2.49787e-08, 0.650774, 0.759271, 3.23632e-08, 0.5, 1, 2.11774e-08, 0.673013, 0.739631, 4.78233e-08, 0.533333, 1, 2.52591e-08, 0.690882, 0.722967, 3.62129e-08, 0.566667, 1, 2.11702e-08, 0.702774, 0.711413, 3.50482e-08, 0.633333, 1, 2.14994e-08, 0.702774, 0.711413, 3.53775e-08, 0.666667, 1, 2.54238e-08, 0.690882, 0.722967, 3.63776e-08, 0.7, 1, 2.11774e-08, 0.673013, 0.739631, 4.78233e-08, 0.733333, 1, 2.49787e-08, 0.650774, 0.759271, 3.23632e-08, 0.8, 1, 3.67218e-08, 0.60042, 0.799685, 4.70949e-08, 0.833333, 1, 2.63662e-08, 0.576432, 0.817145, 4.85832e-08, 0.866667, 1, 2.33095e-08, 0.556296, 0.830984, 3.56522e-08, 0.9, 1, 2.52265e-08, 0.542441, 0.840094, 4.39632e-08, 0.966667, 1, 2.52265e-08, 0.542441, 0.840094, 4.39632e-08, 1, 1, 2.31416e-08, 0.556296, 0.830984, 3.54843e-08, 1.03333, 1, 2.63662e-08, 0.576432, 0.817145, 4.85832e-08, 1.06667, 1, 3.15666e-08, 0.60042, 0.799685, 3.09642e-08, 1.13333, 1, 2.49787e-08, 0.650774, 0.759271, 3.23632e-08, 1.16667, 1, 2.11774e-08, 0.673013, 0.739631, 4.78233e-08, 1.2, 1, 2.52591e-08, 0.690882, 0.722967, 3.62129e-08, 1.23333, 1, 2.11702e-08, 0.702774, 0.711413, 3.50482e-08, 1.3, 1, 2.14994e-08, 0.702774, 0.711413, 3.53775e-08, 1.33333, 1, 2.54238e-08, 0.690882, 0.722967, 3.63776e-08)
102-
tracks/13/type = "value"
103-
tracks/13/imported = false
104-
tracks/13/enabled = true
105-
tracks/13/path = NodePath("Armature/Skeleton3D/bat:scale")
106-
tracks/13/interp = 1
107-
tracks/13/loop_wrap = true
108-
tracks/13/keys = {
102+
103+
[sub_resource type="Animation" id="Animation_wpjvx"]
104+
length = 0.001
105+
tracks/0/type = "value"
106+
tracks/0/imported = false
107+
tracks/0/enabled = true
108+
tracks/0/path = NodePath("Armature/Skeleton3D/bat:surface_material_override/0:albedo_color")
109+
tracks/0/interp = 1
110+
tracks/0/loop_wrap = true
111+
tracks/0/keys = {
112+
"times": PackedFloat32Array(0),
113+
"transitions": PackedFloat32Array(1),
114+
"update": 0,
115+
"values": [Color(1, 1, 1, 1)]
116+
}
117+
tracks/1/type = "value"
118+
tracks/1/imported = false
119+
tracks/1/enabled = true
120+
tracks/1/path = NodePath("Armature:scale")
121+
tracks/1/interp = 1
122+
tracks/1/loop_wrap = true
123+
tracks/1/keys = {
109124
"times": PackedFloat32Array(0),
110125
"transitions": PackedFloat32Array(1),
111126
"update": 0,
112127
"values": [Vector3(1, 1, 1)]
113128
}
114129

130+
[sub_resource type="Animation" id="Animation_iqaxg"]
131+
resource_name = "hurt"
132+
length = 0.26667
133+
tracks/0/type = "value"
134+
tracks/0/imported = false
135+
tracks/0/enabled = true
136+
tracks/0/path = NodePath("Armature/Skeleton3D/bat:surface_material_override/0:albedo_color")
137+
tracks/0/interp = 1
138+
tracks/0/loop_wrap = true
139+
tracks/0/keys = {
140+
"times": PackedFloat32Array(0, 0.133333, 0.266667),
141+
"transitions": PackedFloat32Array(1, 1, 1),
142+
"update": 0,
143+
"values": [Color(1, 1, 1, 1), Color(0.768627, 0.113725, 0.239216, 1), Color(1, 1, 1, 1)]
144+
}
145+
115146
[sub_resource type="AnimationLibrary" id="AnimationLibrary_guetf"]
116147
_data = {
117-
"Idle": SubResource("Animation_vf8tt")
148+
"Idle": SubResource("Animation_vf8tt"),
149+
"RESET": SubResource("Animation_wpjvx"),
150+
"hurt": SubResource("Animation_iqaxg")
118151
}
119152

120153
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_a0k2n"]
121-
animation = &"custom/hurt"
154+
animation = &"hurt"
122155

123156
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ri8va"]
124157
animation = &"Idle"
125158

126159
[sub_resource type="AnimationNodeOneShot" id="AnimationNodeOneShot_18omk"]
160+
mix_mode = 1
127161

128162
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_bslxy"]
163+
graph_offset = Vector2(-345.6, -14)
129164
nodes/Hurt/node = SubResource("AnimationNodeAnimation_a0k2n")
130165
nodes/Hurt/position = Vector2(-40, 208)
131166
nodes/Idle/node = SubResource("AnimationNodeAnimation_ri8va")
@@ -138,19 +173,19 @@ node_connections = [&"OneShot", 0, &"Idle", &"OneShot", 1, &"Hurt", &"output", 0
138173
script = ExtResource("1_ppjak")
139174

140175
[node name="Skeleton3D" parent="Armature" index="0"]
141-
bones/0/position = Vector3(0, 0.00114855, 0)
142-
bones/1/rotation = Quaternion(0.0072053, 0.152345, -0.690993, 0.706589)
143-
bones/2/rotation = Quaternion(0.0085842, 0.00286577, 0.297547, 0.954664)
144-
bones/3/rotation = Quaternion(0.0994829, 0.0798112, 0.288969, 0.948805)
145-
bones/4/rotation = Quaternion(0.0072053, -0.152345, 0.690993, 0.706589)
146-
bones/5/rotation = Quaternion(0.0085842, -0.00286577, -0.297547, 0.954664)
147-
bones/6/rotation = Quaternion(0.0994829, -0.0798112, -0.288969, 0.948805)
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)
148183
bones/7/position = Vector3(0.130992, -0.227392, -0.0878515)
149184
bones/7/rotation = Quaternion(0.261968, 0.0834552, 0.265751, 0.924005)
150-
bones/8/rotation = Quaternion(3.83182e-08, 0.702774, 0.711413, 2.25612e-08)
185+
bones/8/rotation = Quaternion(3.66535e-08, 0.618379, 0.78588, 2.24474e-08)
151186
bones/10/position = Vector3(-0.130992, -0.227392, -0.0878515)
152187
bones/10/rotation = Quaternion(0.261968, -0.0834552, -0.265751, 0.924005)
153-
bones/11/rotation = Quaternion(2.14739e-08, 0.702774, 0.711413, 3.53519e-08)
188+
bones/11/rotation = Quaternion(3.26175e-08, 0.618379, 0.78588, 4.19465e-08)
154189

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

3d-project-completed/project.godot

Lines changed: 1 addition & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -8,70 +8,6 @@
88

99
config_version=5
1010

11-
[Asset_Placer]
12-
13-
Settings/Preview_Perspective=2
14-
Settings/Library_Save_File_Location=1
15-
Shortcuts/Change_Placement_Plane_Position=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":true,"keycode":71,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
16-
],"script":null)
17-
18-
Shortcuts/Transform_Asset_Blueprint=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":true,"keycode":69,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
19-
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":true,"keycode":82,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
20-
],"script":null)
21-
22-
Shortcuts/Select_Previous_Asset=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":true,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
23-
],"script":null)
24-
25-
Shortcuts/Select_Y_Z_Plane=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":true,"keycode":90,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
26-
],"script":null)
27-
28-
Shortcuts/Select_X_Z_Plane=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":true,"keycode":88,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
29-
],"script":null)
30-
31-
Shortcuts/Select_X_Y_Plane=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":true,"keycode":67,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
32-
],"script":null)
33-
34-
Shortcuts/Reset_Transform=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"pressed":true,"keycode":69,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
35-
],"script":null)
36-
37-
Shortcuts/Rotate_Asset_90_Degrees_Around_X=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":true,"keycode":65,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
38-
],"script":null)
39-
40-
Shortcuts/Rotate_Asset_90_Degrees_Around_Y=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":true,"keycode":83,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
41-
],"script":null)
42-
43-
Shortcuts/Rotate_Asset_90_Degrees_Around_Z=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":true,"keycode":68,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
44-
],"script":null)
45-
46-
Shortcuts/Flip_Asset_On_X_Axis=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":true,"keycode":49,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
47-
],"script":null)
48-
49-
Shortcuts/Flip_Asset_On_Y_Axis=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":true,"keycode":50,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
50-
],"script":null)
51-
52-
Shortcuts/Flip_Asset_On_Z_Axis=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":true,"keycode":51,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
53-
],"script":null)
54-
55-
Settings/Shortcut_Shift_Rotation_Step=45.0
56-
Shortcuts/Rotate_Asset_Secondary_Step_Degrees_Around_X=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"pressed":true,"keycode":65,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
57-
],"script":null)
58-
59-
Shortcuts/Rotate_Asset_Secondary_Step_Degrees_Around_Y=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"pressed":true,"keycode":83,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
60-
],"script":null)
61-
62-
Shortcuts/Rotate_Asset_Secondary_Step_Degrees_Around_Z=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"pressed":true,"keycode":68,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
63-
],"script":null)
64-
65-
Shortcuts/Double_Snap_Step=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":true,"meta_pressed":false,"pressed":true,"keycode":4194320,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
66-
],"script":null)
67-
68-
Shortcuts/Halve_Snap_Step=Object(Shortcut,"resource_local_to_scene":false,"resource_name":"","events":[Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":true,"meta_pressed":false,"pressed":true,"keycode":4194322,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
69-
],"script":null)
70-
71-
Settings/Use_Shift_instead_of_Alt=false
72-
Settings/Surface_Placement_Collision_Mask=4294967295
73-
Settings/Show_Tooltips=true
74-
7511
[application]
7612

7713
config/name="Your First 3D Game With Godot 4 (GDQuest)"
@@ -91,7 +27,7 @@ window/stretch/mode="viewport"
9127

9228
[dotnet]
9329

94-
project/assembly_name="Getting started with Godot 4"
30+
project/assembly_name="Your First 3D Game with Godot 4"
9531

9632
[editor_plugins]
9733

@@ -137,4 +73,3 @@ shoot={
13773
[rendering]
13874

13975
renderer/rendering_method="mobile"
140-
anti_aliasing/quality/msaa_3d=1

0 commit comments

Comments
 (0)