Hey @wilcoschoneveld Welcome to the Babylon Family! So great to have you here!!!
I’m bringing in @bghgary to correct me if I’m wrong about some of this.
Blender is a z-up right handed world.
Babylon is a y-up left handed world.
To complicate things, .gltf is also a right handed coordinate system.
Because the coordinate systems are different, there has to be conversion that happens between them.
This happens on the Babylon gltf importer. Whenever you import a .gltf object, Babylon automatically puts in a root node with the scaling you need to make your object work in the y-up left handed world.
SOOOO…what I usually recommend that people do, is to import the .gltf file, and then set the parent of the object to be null instead of the root node. if you use the .setParent() helper method, it will also do the conversion to set the scaling properly to the Babylon world. Ok confusing I know…here’s an example:
If you check out lines 62-65, you’ll see that after importing a snowball .gltf object. we take the first “mesh” object of the snowball asset (which in this case is the root node that the Babylon .gltf importer creates for you) and assigns that to the snowBallParent variable.
Next we return the first child mesh of that parent object and assign that to a “snowBall” variable.
Next is the magic line. We take the snowball variable and use the .setParent(null) method where we tell the Babylon engine that we want this object to have no parent. This helper method will magically copy all transforms to the snowball.
Then finally we dispose of the original parent root node.
let snowBallParent = snowBall.meshes;
snowBall = snowBallParent.getChildMeshes();
When you do this method, it means that you’ll have a clean hierarchy without any strange transforms between your object and the world. As you can probably guess, this is pretty important because the physics engines are going to calculate math based on the Babylon coordinate system.
It’s possible to do without this step, but I think you’ll find it quite a bit easier to go this way.
Hope this helps nudge you in the right direction.
P.S. - I used this specific playground as an example because there’s quite a bit of physics fun happening in this scene that you can reference.