klippp

I am trying to enable a skin which contains a few bones and constraints, I have this code to enable the skin:

skeleton.setSkin("testskin");
skeleton.setToSetupPose();
state.apply(skeleton);

but the all the bones in the skin are placed completely in the wrong position and the constraints don't work as expected. I can see the bones in the wrong position using the debug renderer. Scaling up the skeleton seems to move the bones closer to expected position but they are never quite in the right position
klippp
  • Beiträge: 7

SilverStraw

I have skeleton.updateWorldTransform() after apply() call. Not sure if that helps.
SilverStraw
  • Beiträge: 86

klippp

SilverStraw hat geschrieben:I have skeleton.updateWorldTransform() after apply() call. Not sure if that helps.
Nothing changed :(
klippp
  • Beiträge: 7

Nate

Sorry you are having trouble. Please post or email your skeleton data and atlas so we can see the problem firsthand. contact@esotericsoftware.com
Benutzeravatar
Nate

Nate
  • Beiträge: 12134

klippp

Nate hat geschrieben:Sorry you are having trouble. Please post or email your skeleton data and atlas so we can see the problem firsthand. contact@esotericsoftware.com
I found the solution, it had nothing to do with skins. Scaling the whole skeleton also seemed to be scaling the bones with a transform constraint with a scaling mix. Setting the constraint to local solved the issue.
klippp
  • Beiträge: 7

Nate

Great! Glad you got it worked out.
Benutzeravatar
Nate

Nate
  • Beiträge: 12134


Zurück zu Runtimes