Motion 5 - Spring

background image

Spring

The Spring behavior creates a relationship between two objects, so 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.

Parameters in the Inspector

Affect Subobjects:

This parameter 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 in the parent object are affected
individually. When this checkbox is deselected, all objects in the parent object are affected
by the behavior together.

Attract To:

An image 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:

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:

With this checkbox selected, when the object gets closer to the object of attraction

than the Relaxed Length value, the objects are pushed apart. When this checkbox is
deselected, no repelling force is applied.

Include X, Y, and Z:

Buttons that allow you to 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.

471

Chapter 9

Using Behaviors

background image

HUD Controls
An image well in the HUD lets you set the Attract To object. You can also control the
Spring Tension and Relaxed Length parameters and axis assignment. A checkbox lets you
turn on the Repel parameter. When this behavior is applied to an object that contains
multiple objects (such as a group, particles, text, or the replicator), the Affect Subobjects
checkbox also appears in the HUD.

Related Behaviors

Attracted To

Attractor

Drift Attracted To

Drift Attractor

Orbit Around

Vortex