Attractor

The Attractor behavior, when applied to an object, causes other objects that lie within the area of influence move toward it. You can manipulate the strength with which other objects are attracted, as well as the distance required for attraction to begin.

Canvas showing example of Attractor behavior

By default, objects overshoot the object of attraction and bounce around, never coming to rest. The Drag parameter lets you adjust this behavior, changing whether attracted objects overshoot and bounce around, or whether they eventually slow down and stop at the position of the target object.

The Attractor behavior can affect all objects in the Canvas that fall within the area of attraction, or you can limit its effect to a specific list of objects by using the Affect parameter.

The Attractor behavior can also be applied to objects in motion. If you animate the position of the target object to which you’ve applied the Attractor behavior, all other objects in the Canvas continue to be attracted to its new position.

Adjust this behavior using the controls in the Behaviors Inspector: