Make the GltfNode::children links actually point to children. (#14390)

Due to a bug in `load_gltf`, the `GltfNode::children` links of each node
actually point to the node itself, rather than to the node's children.
This commit fixes that bug.

Note that this didn't affect the scene hierarchy of the instantiated
glTF, only the hierarchy as present in the `GltfNode` assets. This is
likely why the bug was never noticed until now.
This commit is contained in:
Patrick Walton 2024-07-19 05:24:06 -06:00 committed by GitHub
parent e5bf59d712
commit 2a6dd3e2e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -604,7 +604,7 @@ async fn load_gltf<'a, 'b, 'c>(
(
child.index(),
load_context
.get_label_handle(format!("{}", GltfAssetLabel::Node(node.index()))),
.get_label_handle(format!("{}", GltfAssetLabel::Node(child.index()))),
)
})
.collect::<Vec<_>>(),