1.1 - Random Meshes

An overview of the Advanced Blueprints example level, example 1.1: Randomly Scattered Meshes

On this page


The BP_Random_Meshes Blueprint uses the Construction Script to randomly scatter Static Meshes within a radius, using exposed variables to allow users to customize the scale, rotation, and spacing of the Static Meshes. All of the Static Meshes are actually components within the BP_Random_Meshes Blueprint.

Construction Script

Click for full size or right-click and Save As.

  • A ForLoop node is used to repeat a section of script a specified number of times. In this case, the Number of meshes variable is also the number of times the ForLoop will repeat, adding a new StaticMeshComponent each time.

  • RandomFloatInRange nodes are used to randomize the location, scale, and rotation of the StaticMeshComponents, as well as the StaticMesh assets being used.

  • An array is used to allow the user to specify a list of possible StaticMeshes that will be set for the StaticMeshComponents in the Blueprint. After each StaticMeshComponent is added, a StaticMesh asset is picked from the array using a random index number and assigned to the newly added StaticMeshComponent.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey