• Editor
  • Any way to have constraints with attachments paths or bones?

Hello!

I'm making a game using Spine (libgdx) and to make the characters look more natural and detailed, I've got art for each character in four poses: facing forward, backwards, right, and then casual. Using a slot for each image, I'm able to create some decent 3D-ish rotations:

However I'm having to do lots of animation keying:

Looking at how others approach 3D-ness using 2D assets, I love the use of transform constraints e.g. But only think this works if the art stays facing in roughly the same direction.

Is it, or could it ever be, possible to add attachments or slots to transform constraints? I'd love to be able to set something like

  • if facing < -90, scale = -1, attachment path = right
  • if facing < 0, scale = -1, attachment path = casual
  • if facing = 0, scale = 1, attachment path = front
  • if facing > 0, scale = 1, attachment path = casual
  • if facing > 90, scale = 1, attachment path = right

That way my animations could be much smoother and simpler.

I think I could possibly achieve this by extending the Spine runtime with custom properties but then I lose all the animation features of the Editor.

Related Discussions
...
  • تم التحرير

Hi, welcome to the Spine forum!

Is what you want a system that automatically switches attachments depending on the direction of the character? Live2D has such a design concept, but Spine does not currently have such a feature. Therefore, switching the active attachment of each slot at the time you want to switch the orientation, as you are doing now, is the right way.

Looking at how others approach 3D-ness using 2D assets, I love the use of transform constraints e.g. https://www.youtube.com/watch?v=aX3a1ar6CXg. But only think this works if the art stays facing in roughly the same direction.

No, you can still use transform constraints to get a 2.5D effect, even if the character has to switch directions. Simply give each direction mesh a weight to the same face direction control bone. If you have already tried something but it did not work, explain it to us and we may be able to give you specific advice.

While we don't yet have a feature like that in Spine, you could combine both your own runtime code and the Spine editor. For example, you could choose an animation based on the rotation you want to show. With Spine you can apply multiple animations at once at runtime, so you could even choose the two rotation animations that are closest to the angle you want, then use TrackEntry alpha (or Timeline apply) to interpolate to any angle between those animations.

People have gotten extremely creative with turning around! This video shows a really amazing setup (with the dog). You may need to use backface culling.