Skeleton Misaligned with Mesh After Import

I researched the forum for my issue and saw similar problems, but I couldn’t apply other solutions to my situation. Similar issue:

image
image

Here’s the problem I’m facing. I suspected that the issue might be with the GLB model itself, but when I load it in the glTF Viewer, the skeleton is inside the mesh, and everything is fine.

It’s very important to me that both the mesh and the skeleton work correctly immediately upon loading by SceneLoader. :face_holding_back_tears:

const importedMeshes = await SceneLoader.ImportMeshAsync('', meshTask.rootUrl, meshTask.sceneFilename)

When trying to place an item in the character’s hand, it turned out that the skeleton loads not inside the mesh, but is rotated and scaled up. Then I highlighted the skeleton using the SkeletonViewer, and it became clear what the problem was.

If you’re a passing Jedi and have had a similar problem, please help with positioning the skeleton and synchronizing it with the mesh.

@onekit I imported your player.glb into Blender, scaled the skeleton up by 20X, and exported the new player.glb into the Playground below:

Here’s a video of the changes I made in Blender. To summarize, the skeleton had a 0.05 scale instead of 1. So I just scaled the skeleton up by 20X and “Apply All Transforms” in Blender:

I also scaled the mesh down by 20X to give the original size as your first Playground:

meshes[0].scaling.multiplyInPlace(new BABYLON.Vector3(0.05, 0.05, 0.05))
1 Like

Dear regna,

Thank you for guiding me onto the right path. I was stuck on my pet project for half a month because of this issue, and now you’ve saved me. It looks fixed now. :smiley:

May the Force be with you. You even took the time to record a video explanation.
Thank you so much. :handshake:

When the beta version of the game is ready, I’ll definitely show you my hobby project, which you’ll be able to play. :hugs:

2 Likes

I’m happy to be able to help :slight_smile: Your game looks amazing, and I’m excited to play when ready!

2 Likes