Attach Constraint basics

attach constraint: when u add it, how is the distance between markers determined?
based on what ?

if distance between them is changing over time…will it try to maintain that change ?

Hey @mu_bebawy, the Attach Constraint works like traditional Maya parenting.

  1. Select Child
  2. Shift + Select Parent
  3. Attach

The child will now act as a child relative the parent, except it is parented to the physical (dynamic) version of the character rather than the Maya (kinematic) version.

In the above example, the Attach Constraint makes the box act as though it was parented to the head. You’ll notice the constraint handle is parented to the head, and that it moves along with it. We can also offset this position.

This visualisation demonstrates where on the simulated parent you want the child to reach. As the parent moves around, it will attempt to position the child at this position.

The same applies in more complex cases, such as:

Here, we use the visualisation to position the hand at a specific location and in a specific pose relative the foot, which is acting as the parent of the hand.

The distance (and orientation) is maintained for as long as there is Stiffness on the Attach Constraint.

1 Like

Hey Marcus,
thank you for this detailed answer and those super helpful videos.

what would be the expected behaviour if i added motion to the child by animating the attach constraint like you did in the 2nd video ?

also, is there a way to constrain a specific axis on child to its parent? only Translate Y for example ?

will share a video of what i tried at work yesterday in a bit , have to replicate it on my machine .

In the second video, notice I only pause and then make changes to the constraint. Ragdoll will try and reach that position over time as it changes.

Yes, both Pin and Attach Constraints have an Advanced section in the Attribute Editor to control the amount of influence on each axis. For rotation, “twist” represents X rotation, and “swing” is Y and Z combined.

By limiting the effect to only X and Z you can achieve effects like this self-walking rhino for example.