• Editor
  • Grouping ikconstrains and controling what to stretch.

  • Đã chỉnh sửa
Related Discussions
...

Hey,

My animator is trying to animate character knives on string and make them easy to control where they gonnanhit by spine runtimes, but he can't find work around to stretch only string without making same for knives. What can he do to achieve that?

How it looks.

How it stretch

How I want it to be Grouped

I think you should use paths and path constraints to control the entire motion of the knife and string. I have created an example project for this, you can download it below:
KnifeAndString.zip

The setup is almost the same as the Vine example project. The bones for the string are constrained to a path by a path constraint, and the path is bound to two bones for overall control, the control bones are constrained by an IK constraint. At the start of the animation, the IK Constraint's Mix is 0, allowing the control bones to pose freely, but as the Mix increases from 0 to 100 during the animation, they rotate and stretch to point at the target bones. You can animate the spacing of the path constraint , or change the scale of the String bones so that the string stretches in the motion. The knife bone is a child of the string tip bone, but it does not stretch because scale inheritance is turned off.

The project above was made for illustrative purposes, so I know it would need to add more bones to bend the string and adjust the intermediate poses, but as a mechanism, this should allow you to attack anywhere you want by overriding the IK target bone positions at runtime.

I hope this will help you.

Misaki đã viết

I think you should use paths and path constraints to control the entire motion of the knife and string. I have created an example project for this, you can download it below:
KnifeAndString.zip

The setup is almost the same as the Vine example project. The bones for the string are constrained to a path by a path constraint, and the path is bound to two bones for overall control, the control bones are constrained by an IK constraint. At the start of the animation, the IK Constraint's Mix is 0, allowing the control bones to pose freely, but as the Mix increases from 0 to 100 during the animation, they rotate and stretch to point at the target bones. You can animate the spacing of the path constraint , or change the scale of the String bones so that the string stretches in the motion. The knife bone is a child of the string tip bone, but it does not stretch because scale inheritance is turned off.

The project above was made for illustrative purposes, so I know it would need to add more bones to bend the string and adjust the intermediate poses, but as a mechanism, this should allow you to attack anywhere you want by overriding the IK target bone positions at runtime.

I hope this will help you.

Thanks for that.

Can I somehow make it controllable by spine runtimes? Problem is that once made in editor I don't know how to change where it goes.

You can move the IK target bones at runtime. You can also adjust the path vertices, if you don't want the spikes to be a straight line.