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.

Select Skin

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback