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: