@Deltakosh did you fix that already? Because I checked my branch I dont even see any declarations to skeletonViewer.material anywhere? UPDATE yeah he did I see the commit!
It would be skeletonViewer.debugMesh.material if you are trying to access that.
I can add a getter/setter for you if that makes things easier!
Ummmm, looks like you might have multiple skeletons and the green one has some incorrect values maybe?
That is rather odd, Id have to see your data, which one is the green skeleton coming from? It looks like the gray one is correct and Im assuming that is the imported one?
In this Playground, I set the rest pose to that of the hips and leftUpLeg bones in my other Playground. I then set the position and rotation to that of the animation data on frame 300.
Since there is a slight difference in the rig rest pose and the animation data rest pose, they donât line up perfectly so I guess thatâs why the parent bone doesnât point on the child bone.
Would it make sense to update the spur of the parent bone to point at the bone which position was changed?
We have no control directly over the spurs and spheres they are not physically being positioned but rather just distorted by bone weights, there would be no real reason for what you to see to happen unless underlying data is wrong.
If you can help me figure out whats really going on I can help but Im rather clueless what we are looking at in your PG
It also seems like you have multiple congruent posts about this so at this point Im not sure which to address and which overlap.
So the only why to get it looking OK is to change the rest pose. But that I cannot do since I need it for animations. So I guess I need to start digging in bone.ts.
No just when you make the skeleton viewers, after that play all the animations you want. They require the restposes to be weighted correctly. Itâs that your manually created bones donât have the same matrices prepared as if it was imported because you are managing them it will be on you to make sure the data is correct when you make the viewer after that anything you do to the bone will move the visual. Otherwise if you are not able to setup your data correct your fallback is the lines mode which samples positions every frame as opposed to the second two modes which are a skinned unified mesh.
That seem to be true for rotation and scale, but everytime you change the position of a child node you get disconnected spurs.
I did some digging in Maya and it looks like whenever you change the position of a child joint the parent local rotation axis is not affected, but the visual representation of the skeleton is updated so that all joints are connected at all times.
You technically are changing the length of the bone in Maya and its automatically assuming you want that functionality. BJS is not Maya or an editor and when you move a child bone its more or less an offset from the parents end. If you want functionality like that you have to script it because we do not assume to modify the parents data when changing a child. Babylon is just a rendering engine you create things like that for it as extensions, but as a word of faith it is all possible!
My current full time job is working with a team who is making an animation editor so we have had to deal with a lot of the things you are concerned about as well. So take it from me with a little bit of ingenuity you can make it happen to.
Why not create a class that you can pass bones you want connected like that and you will have to update function after some sort of translation action like you are doing.