• Editor
  • make transform respect rotation

I've got a gun bone that rotates 360 degrees. When it fires I'd like to make it recoil a bit, using a transform. The trouble I'm having is that my transforms always happen in the same direction (left) and ignore the rotation of the gun. How can I specify a transform in Spine editor that will honor the gun's rotation?

Related Discussions
...

What do you mean by "using a transform"? That doesn't match up well to Spine terminology. A bone has a transform made up of rotation, translation X/Y, scale X/Y, and shear X/Y. A transform constraint copies a bones transform to another bone, but it's unlikely you need that to simulate recoil. Do you mean you are scaling a bone and it isn't scaling in the direction you want?

Sorry meant translate.

I'm wanting to translate the gun bone in the opposite direction it's facing for a recoil effect. If there's a way to do that in Spine editor that would be great, otherwise I'll figure out how to do it with code.

Use a transform constraint. Knowing the set up of your gun skeleton would be a help, but it sounds like this is the exact kind of thing that transform constraints are made for. If you give more info, even a sketch or screen shot of your set up I'm sure that someone (even me) can help.

I figured out a solution: I rotated the parent bone, and only translated the child bone, and gave it an IK constraint. Works great! I'll have to re-learn the difference between IK and transform constraint.