aboutsummaryrefslogtreecommitdiff
path: root/src/scene/animation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scene/animation.c')
-rw-r--r--src/scene/animation.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/scene/animation.c b/src/scene/animation.c
index 601c400..a498961 100644
--- a/src/scene/animation.c
+++ b/src/scene/animation.c
@@ -204,10 +204,6 @@ void gfx_destroy_anima(Anima** anima) {
204 mem_free_animation(&animation); 204 mem_free_animation(&animation);
205 } 205 }
206 206
207 if ((*anima)->parent.val) {
208 gfx_del_node((*anima)->parent);
209 }
210
211 mem_free_anima(anima); 207 mem_free_anima(anima);
212 } 208 }
213} 209}
@@ -450,10 +446,8 @@ void gfx_update_animation(Anima* anima, R t) {
450 // which we have constructed to be the common root of all skeletons. 446 // which we have constructed to be the common root of all skeletons.
451 // 447 //
452 // This procedure touches every joint exactly once. 448 // This procedure touches every joint exactly once.
453 SceneNode* root_node = mem_get_node(anima->parent); 449 const mat4 root_global_transform = mat4_id();
454 // LOGD("Root: %u, child: %u", anima->parent.val, root->child.val); 450 const mat4 root_inv_global_transform = mat4_id();
455 const mat4 root_global_transform = gfx_get_node_global_transform(root_node);
456 const mat4 root_inv_global_transform = mat4_inverse(root_global_transform);
457 451
458 Joint* root_joint = get_anima_root_joint(anima); 452 Joint* root_joint = get_anima_root_joint(anima);
459 compute_joint_matrices_rec( 453 compute_joint_matrices_rec(