BUG: Mesh flips on mesh.skeleton = skeleton

Hey guys,

I’m trying to apply a mesh with vertices onto a skeleton, but the mesh completely flips before I can do anything related to skinning.

This line is the culprit

catmesh.skeleton = skeleton // CAUSES MESH TO FLIP 90 DEGREES

Here’s the PG

image

My usecase is to generate an empty skeleton first, then bind meshes onto the bones through skinning algorithms.

But before this step, the mesh needs to be positioned correctly and not have weird flipping glitches… :thinking:

I’ve tried to follow the structure of GLB imported characters but it doesnt seem to be working

Commenting out line 56 that sets the skeleton’s overrideMesh seems to fix the issue.

Ok thanks Blake, what’s the recommended procedure here if I want to make sure this will work for the skinning? The reason I set skeleton.overrideMesh is because that’s how GLB skeletons seem to be imported

IDK whenever I’ve made the skeleton programmatically I also made the mesh programmatically so never needed or noticed it I guess… We’ll have to wait for someone else to help answer that for us. :slight_smile:

1 Like

@bghgary is working on an improvement here that will remove the need for overrideMesh

2 Likes

@Deltakosh @bghgary awesome, can’t wait for it :star_struck:
Can’t count the amount of times we had to hack around skeleton.overrideMesh :laughing:

3 Likes

Yeah I agree :slight_smile: the PR is in now :wink:

2 Likes

oh wow, hope it doesn’t break anything!
Thanks a lot!

1 Like

Hi @mrlooi have you had a chance to check the fix? Did it solve the issue for you?

I haven’t checked the latest PR without the overrideMesh, will get to it soon :slight_smile:

1 Like