I scaled my spine anim according to sample code in this topic :
http://fr.esotericsoftware.com/forum/How-to-scale-skeleton-at-a-pivot-point-6356.
Sample code:
And now when I'm moving skeleton using skeleton.setPosition() it moves into new projection coordinates but I want it to move in the old projection coordinates.float originX = 100, originY = 100;
Matrix4 proj = batch.getProjectionMatrix();
proj.translate(originX, originY, 0);
proj.scale(1.2f, 1.2f, 1);
proj.translate(-originX, -originY, 0);
batch.begin();
renderer.draw(batch, skeleton); // Draw the skeleton images.
batch.end();
debugRenderer.getShapeRenderer().setProjectionMatrix(proj);
debugRenderer.draw(skeleton); // Draw debug lines.
proj.translate(originX, originY, 0);
proj.scale(1 / 1.2f, 1 / 1.2f, 1);
proj.translate(-originX, -originY, 0);
How can I translate coordinates from the old projection to the new projection?
Or is there another better method to scale the skeleton at a custom pivot point?
I also tried this method, but it didn't work. Can I get more details about it, please, maybe I did something wrong.
Otherwise you can have the root bone, then second bone that all your other bones are attached to. Programmatically position the root (to set the scale origin) and the second bone (to set the skeleton location), then scale the root.