@@ -6239,19 +6239,17 @@ static ModelAnimation *LoadModelAnimationsGLTF(const char *fileName, int *animCo
6239
6239
* animCount = (int )data -> animations_count ;
6240
6240
animations = (ModelAnimation * )RL_CALLOC (data -> animations_count , sizeof (ModelAnimation ));
6241
6241
6242
- Transform worldTransform ;
6243
- {
6244
- cgltf_float cgltf_worldTransform [16 ];
6245
- cgltf_node * node = skin .joints [0 ];
6246
- cgltf_node_transform_world (node -> parent , cgltf_worldTransform );
6247
- Matrix worldMatrix = {
6248
- cgltf_worldTransform [0 ], cgltf_worldTransform [4 ], cgltf_worldTransform [8 ], cgltf_worldTransform [12 ],
6249
- cgltf_worldTransform [1 ], cgltf_worldTransform [5 ], cgltf_worldTransform [9 ], cgltf_worldTransform [13 ],
6250
- cgltf_worldTransform [2 ], cgltf_worldTransform [6 ], cgltf_worldTransform [10 ], cgltf_worldTransform [14 ],
6251
- cgltf_worldTransform [3 ], cgltf_worldTransform [7 ], cgltf_worldTransform [11 ], cgltf_worldTransform [15 ]
6252
- };
6253
- MatrixDecompose (worldMatrix , & (worldTransform .translation ), & (worldTransform .rotation ), & (worldTransform .scale ));
6254
- }
6242
+ Transform worldTransform = { 0 };
6243
+ cgltf_float cgltf_worldTransform [16 ] = { 0 };
6244
+ cgltf_node * node = skin .joints [0 ];
6245
+ cgltf_node_transform_world (node -> parent , cgltf_worldTransform );
6246
+ Matrix worldMatrix = {
6247
+ cgltf_worldTransform [0 ], cgltf_worldTransform [4 ], cgltf_worldTransform [8 ], cgltf_worldTransform [12 ],
6248
+ cgltf_worldTransform [1 ], cgltf_worldTransform [5 ], cgltf_worldTransform [9 ], cgltf_worldTransform [13 ],
6249
+ cgltf_worldTransform [2 ], cgltf_worldTransform [6 ], cgltf_worldTransform [10 ], cgltf_worldTransform [14 ],
6250
+ cgltf_worldTransform [3 ], cgltf_worldTransform [7 ], cgltf_worldTransform [11 ], cgltf_worldTransform [15 ]
6251
+ };
6252
+ MatrixDecompose (worldMatrix , & worldTransform .translation , & worldTransform .rotation , & worldTransform .scale );
6255
6253
6256
6254
for (unsigned int i = 0 ; i < data -> animations_count ; i ++ )
6257
6255
{
0 commit comments