Skip to main content

Randomization

For a more realistic feel, Errant Paths support randomization when spawning meshes.

Spawn Probability

PathTemplate meshes can be spawned with some given probability, allowing for randomized mesh spawning. To use this behavior open a PathTemplate, select one of the template meshes (of PathTemplateStaticMeshComponent or PathTemplateSplineMeshComponent type). In the Details tab, under the Spawning category find the Spawn Probability property.

SpawnProbabilityPropertyImage

To have your mesh spawn randomly, choose some lower probability number.

note

In a component hierarchy any of the components not being spawned will also cause its children not to be spawned.

Random Mesh Selection

Spawn Probability can also decide what mesh from the group of meshes should be spawned. This allows some variation within a single PathTemplate. To create that group, open a PathTemplate, add a PathTemplate mesh and find the Spawn Only One Child under the Spawning category in the Details tab. If enabled, children of this mesh form the group.

RandomMeshSelectionProperty

note

Spawn Probability in the group is about relation to other sibling. For example for two children with the probability of 1.0 and 0.5, their chance of being spawned is 66% and 33%.

The video below shows the example variation between three types of the cube. Red, Blue and Green. Their parent only exists to group them, it has disabled spawning.

Random Location/Rotation/Scale

Mesh location, rotation and scale can also be randomized within user-given margins. Similarly to randomized spawning, go to mesh Details tab, Spawning category and open the Random Offset Data category. In this category you can individually enable and disable randomization for location, rotation and scale and modify the margins for the enabled values.

RandomizationPropertyImage

note

Location offset is added relatively to the path - so X offset is along the path, Y is perpendicular to the path, Z is upwards.