# Transform Constraint

## Intro​

Constrain one Shape to another.

## UI​

Target - The Shape to constrain to.

Offset - Add/subtract a value to the Shape's original position.

Rest Position - The position a Shape will return to when Position Strength is set to 0.

Rest Offset - Add/subtract a value to the Rest Position.

Rest Rotation - The rotation your Shape will return to when Rotation Strength is set to 0.

Rotated Offset - Add/subtract a value to the Rest Rest Rotation.

Position Strength - A multiplier to Out Position. Adjusting this value will determine the position of your Shape along a vector between 0, 0 and the transform of your Target.

Out Position [read only] - Shows the [x, y] values being output by the Constraint. Where the Id connection combines both the x and y positions this attribute allows you to connect the separate [x, y] attributes to other layers.

Rotation Strength - A multiplier to Out Rotation.

Out Rotation - Connect this attribute to the rotation of another Shape.

Example

Pick up a Shape with another Shape:

The quick way:

1. Follow steps 1-6 below (the long way).
2. Move to frame 50.
3. Select the Constraint.
4. Navigate to Animation > Constraints > Transform Constraint Tools > Pick Up.
5. Move to frame 150.
6. Navigate to Animation > Constraints > Transform Constraint Tools > Drop

Now Hand should 'pick up' Ball at frame 50 and then 'drop' it again at frame 75.

The long way:

1. Create 2 Shapes
2. Name one 'Hand' and the other 'Ball'.
3. Create a Transform Constraint.
4. Connect constraint.outPositionball.position.
5. Connect Hand as your Target. on the Constraint.
6. Set 2 position.x keys (fr0 = -200, fr200 = 200) for Hand (animate it horizontally).
7. Set Position Strength on the Constraint to 0 for both X and Y.
8. On frame 50, copy Hand's Position X value and paste it into the Constraint's Rest Position X.
9. Set a key on Rest Position X.
10. Go back one frame.
11. Set a key on Position Strength X with a value of 0.
12. Go forward one frame.
13. Set a key on Position Strength X with a value of 100.
14. Go to the first frame.
15. Hit play.

At frame 50 Hand should 'pick up' Ball.

1. Move to frame 74.
2. Set a key for Position Strength X (should be a value of 100).
3. Move to frame 75.
4. Copy Hand's Position X value and paste it into the Constraint's Rest Position X.
5. Set a key on Rest Position X.
6. Set a key for Position Strength X with a value of 0.
7. Go to the first frame.
8. Hit play.

Now Hand should 'pick up' Ball at frame 50 and then 'drop' it again at frame 75.