• Editor
  • Path constraint scaling

Hello, so i recently ran into a problem while trying to export my animations as gifs. My riggs were too big so the logical solution i thought of was just to scale the root bone and then export. And with most of my riggs all went ok, but as soon as i tried to scale riggs that had path constraints in them the mesh would always bend and break. Moreover if you scale the root bone which has path constraints in it and it then would break, you obviously try to scale back up, or ctrl + z but that doesnt work and you have to reload your file. Not sure if this was intended.
A workaround that i found was to change the spacing option in path constraint from percent to length. Not exactly sure why this works but it does (would be nice to get that explained 🙂 ). Switching this changes the position of mesh a tiny bit, but not so much and then you can scale with no problems.


Related Discussions
...
  • Modificato

Not sure if I understood well, but as soon as you apply some scale on a bone, if some images are childs of this bone, AND have a path constraint, then yeah, it'll break. You need to put your images outside of the parent bone.

yeah but it wont break if your path constraint spacing option is length instead of percent, doesn't matter if it's parented to a bone or not.

Hmm, you're right, this is a bug. Path constraints are quite complex given all their various modes and the combinations possible, but in a nutshell, length spacing works because it correctly takes into consideration the path bone's scale. The bug is that scaling is affecting percent spacing, which doesn't make any sense since using a percentage inherently considers the scale. We've fixed this in spine-libgdx in the 3.7-beta branch and will have the fix in the other runtimes soon. It also fixes fixed position and fixed spacing not being affected by scale.

Cheers! :beer: