Random Motion

The Random Motion behavior animates the position of an object and makes that object move around the canvas along a random path. The Random Motion behavior is useful for creating varied animation paths for large numbers of objects you want to move at the same time. For example, you can create an arrangement of ten objects in the canvas and apply the Random Motion behavior to them all.

Although the motion created with this behavior appears to be random, it’s predetermined by the group of parameters you’ve chosen. As long as you don’t change the parameters, the animation path created by this behavior remains the same. If you don’t like the path that was randomly generated, click the Generate button in the HUD or in the Behaviors Inspector to pick a new random seed number. This number is used to generate a new path.

You can also use the Random Motion behavior to add variation to the animation paths created by other behaviors that affect an object’s position. In the following example, adding Random Motion to an object with the Orbit Around behavior results in a more erratic animation path from orbit to orbit, although it still moves around the center as before.

Canvas showing Orbit Around behavior combined with Random Motion behavior

Adjust this behavior using the controls in the Behaviors Inspector: