RandomVec

RandomVec (2 | 3)

Function. Outputs a random 2D or 3D vector with a specified length.

The direction of the vector is uniformly distributed. The length equals the Radius parameter. Useful for generating random directions for particle velocity or offset.

Properties & inputs:

  • Radius (input | property): Length of the resulting vector.

Output:

  • Random vector with the specified length, pointing in a uniformly random direction.

Unreliable in the construction chain

Like Random, feeding RandomVec into a constructor input (Color, Origin, ...) is discouraged. Wiring it (directly or through other function blocks) into a constructor input flags the block with a warning in the Emitter Scheme (amber outline + tooltip); the effect still exports, but the value is a constant in the preview and re-evaluates every rendered frame in game runtimes. Store the value per particle at spawn (Custom Value with On Init enabled) or compute it in the update chain instead.