• Editor
  • How to make two path constraints always match positions?

I'm new to spine, so this might be a dumb question, but I can't figure it out. I've got two paths, each with their own bone. I want the position of bone B to always match the position of bone A, so for example, when A is 42% down its path, B will also be exactly 42% down its own, separate path. How do I do this?

Related Discussions
...

To make two path constraints always match positions, you can use a combination of path constraints and transform constraints. First, ensure that each bone is constrained to its respective path using a path constraint. Set the position of each bone along its path using the Percent option, which allows you to specify the position as a percentage of the total path length.

Next, you can use a transform constraint to link the position of bone B to bone A. Set the transform constraint to affect the translation of bone B based on bone A's position. This way, when bone A moves to a certain percentage along its path, bone B will follow suit on its own path. You can adjust the mix settings of the transform constraint to ensure that the influence is as desired.

This setup allows you to synchronize the movement of two bones along separate paths by using path constraints for positioning and a transform constraint for linking their positions.

That doesn't seem to work. The transform constraint just dominates bone B, and the percentage on its path constraint never changes. Using a transform constraint works fine on its own if both paths are straight lines going the same direction, but I have curves on the paths I'm using.

Are the two paths identical? you could copy-paste the keys you set for one path constraint also on the other path constraint. Having more details would really help. (for example why the two paths need to match, if the paths will dinamically change, etc)

The paths are not identical, and they won't change dynamically. I'm trying to sync the eye and head movements of a character rotating its head, to appear as if its gaze follows a person as they walk by the screen. We've got a motion sensor hooked up, and we just need to use the input from that to key these path positions as it is animated in real time (I'm not the programmer, so I don't understand how it all works exactly, but that's the best way I can explain it). Though we could just have the input affect both the variables for the eyes and head at runtime, I was looking to see if I could link the two while it's all still in spine.

    Eyrienaut I am not sure if I fully understand, but I think what you are trying to do probably cannot be fully realized as desired with the current Spine features. Not only is there no feature to synchronize the values of different path constraints, but it is also impossible to associate transform constraints with different transform values, or even you can separate X and Y, but not left and right and up and down. For example, it is not possible to transform a bone only if its target bone moves to the left.
    Because of these limitations, it would be quite difficult to synchronize within the ideal motion constraints, even if some other method were used instead of path constraints. It is probably most realistic to say that this will be realized at runtime.

    For your information, adding options for such advanced automatic control is on our roadmap:
    EsotericSoftware/spine-editor121
    EsotericSoftware/spine-editor658