Spring

The Spring behavior creates a relationship between two objects, so that an object with the Spring behavior applied to it moves back and forth around a second object. The Attract To parameter defines the object that serves as the target and center of the Spring behavior. Additional parameters let you adjust the speed of the behavior (Spring Tension) and the acceleration of the object at each change in direction (Relaxed Length).

If the Attract To object is at rest, the resulting motion is fairly simple and the springing object moves back and forth in a straight line. If the Attract To object is in motion, the springing object’s motion is much more complex, changing direction according to the velocity of the Attract To object.

Adjust this behavior using the controls in the Behaviors Inspector:

  • Affect Subobjects: A checkbox that appears when this behavior is applied to an object that contains multiple objects, such as a group, a particle emitter, a replicator, or a text layer. When this checkbox is selected, all objects enclosed in the parent object are affected individually. When this checkbox is deselected, all objects enclosed in the parent object are affected by the behavior together.

  • Attract To: An object well that defines the object of attraction. To set the defined target object, drag the object from the Layers list to the Attract To well in the Spring HUD or Inspector. In the Layers list, you can also drag the target object onto the Spring behavior.

  • Spring Tension: A slider that determines how fast the object is pulled toward the object of attraction.

  • Relaxed Length: A slider that sets the distance from the target object where object attraction diminishes to zero. As the springing object’s distance increases past this point, the force of attraction increases proportionally, to bring it back toward the target object.

  • Repel: A checkbox that, when selected, pushes objects apart as the target object gets closer to the object of attraction than the Relaxed Length value. When this checkbox is deselected, no repelling force is applied.

  • Include X, Y, and Z: Buttons that specify the space in which the affected object moves back and forth around the assigned object. For example, when X and Y are enabled, the object moves back and forth in the XY plane; when Y and Z are enabled, the object moves back and forth in the YZ plane.