Show / Hide Table of Contents

Varia Random Position / Rotation / Scale

This trio of components respectively randomize the position, rotation and scale of transform.

Position

RandomPosition translates the object by a random vector. The vector is picked from inside a box specified by min/max x/y/z. The box is normally oriented the same way as the object (i.e. local space), but you can change the Relative To to World or Parent to use other co-ordinate systems.

When editing, a gizmo displays the box in the correct orientation.

Rotation

Random Rotation rotates an object a random number of degrees around a given local point and axis. So it works similarly to Transform.RotateAround.

When editing, a gizmo draws the axis of rotation, and an arc of the min/max number of degrees.

Additionally, you can set a random dispersion, which causes the object to randomly turn a number of degrees in a random axis perpendicular to the specified axis.

When editing, dispersion is shown as a pair of circles.

Scale

Random Scale randomly scales an object by a random amount. If linked is true, all three axes are scaled by the same amount, otherwise each is scaled independently.

If scale origin is set to a local, then the component also translates the transform, so that the given position doesn't move after scaling.

In this article
Back to top Generated by DocFX