Feature I'm wanting to implement: 'clone' objects that are tied to the original.
The sort of thing that gets used in a puzzle game - there are two of you, and you can only move 'north' if both copies are unobstructed. Essentially, the x and y distance between the clones are locked. This could be done with a pair of distance joints, if the objects were unable to rotate.
But I also want the objects to be able to rotate (either independently or also both locked to the same angle, but not around a common central pivot!)
As best as I can tell, what I'm looking for is two additional types of joint - a "relative position" joint and a "relative angle" joint.
I feel like this could maybe be done with a crazy stack of things, like a pair of invisible objects with prismatic x-axis and y-axis joints to a static object, with those prismatic joints being linked together with gear joints, and then a revolute joint on top of each of those objects, with the two revolute joints gear-joined together, and then the actual objects attached to the revolutes. But it also seems like that's a bit of a hideous way to do it (especially if it gets into more than 2 clones), hence the question, is there a way to make custom joints between objects, without modifying the library?
Alternatively, is there a less hideous third way to implement that behavior? Or, another alternative, is the hideous stack of things actually not as bad as I think?
The sort of thing that gets used in a puzzle game - there are two of you, and you can only move 'north' if both copies are unobstructed. Essentially, the x and y distance between the clones are locked. This could be done with a pair of distance joints, if the objects were unable to rotate.
But I also want the objects to be able to rotate (either independently or also both locked to the same angle, but not around a common central pivot!)
As best as I can tell, what I'm looking for is two additional types of joint - a "relative position" joint and a "relative angle" joint.
I feel like this could maybe be done with a crazy stack of things, like a pair of invisible objects with prismatic x-axis and y-axis joints to a static object, with those prismatic joints being linked together with gear joints, and then a revolute joint on top of each of those objects, with the two revolute joints gear-joined together, and then the actual objects attached to the revolutes. But it also seems like that's a bit of a hideous way to do it (especially if it gets into more than 2 clones), hence the question, is there a way to make custom joints between objects, without modifying the library?
Alternatively, is there a less hideous third way to implement that behavior? Or, another alternative, is the hideous stack of things actually not as bad as I think?
