#Weird scaling when loading from Gltf primitives

4 messages · Page 1 of 1 (latest)

undone edge
#

Hi guys, I was trying to load meshes from a .glb(gltf) file to then spawn them in big groups, but I get a weird scaling issue.

The tree on the right is spawned using a SceneBundle, with the scene loaded directly from the gltf with "tree.glb#Scene0". The result is normal as expected.

On the example on the left I instead first load the file as Gltf, and then access the primitives inside the mesh using Res<Assets<Gltf>> and spawn those. In this case the tree looks like it's been scaled down on the y axis for some reason.

I don't understand if I'm doing something wrong or if this might be a bug.
Here is the code I used for this example https://gist.github.com/giusgad/3927beec2a70d8dbc3f486cc94674906
Thanks in advance for the help!

Gist

Bevy weird scaling example. GitHub Gist: instantly share code, notes, and snippets.

quartz pasture
#

Are you working with Blender? Maybe there is some scaling that needs to be applied before exporting

#

Afaik scaling in edit mode is fine, but in object mode it's best to apply the scale after you scale it

undone edge
#

Yep that was it I applied all transforms before exporting and it worked. Thanks a lot!