Placing actors to predefined location

Hello UE community,

I am having trouble placing meshes to predefined location automatically. Let’s dive into my problem.

I am creating map for simulator, in which I will be testing autonomous driving vehicles. I have to create track for them. The track consists of cones placed on huge parking lot. I have created parking lot, I have 200 locations of cones [x,y,z, rotx, roty, rotz], but I haven’t found way to automatize this yet. Of course I can place all cones manually, but it is really time-consuming and tiring. Is there a way to use these locations and place them automatically? If yes, how?

Thank you very much for your answers,
. :slight_smile:

Ensure you’ve got the array of locations / rotations (here using Transform for convenience) and:

You can select the Add Static Mesh Component node and assign the desired (cone) mesh.

You could run this on Begin Play or place the script in another actor’s Construction Script. Placing that actor in the world will execute it.

Hey,

I recently made some code for a ‘tile map’ where I spawn planes in rows and collumns
and with the Construction Script I can see the result before starting the game

This is an automated system with calculation for scaled plane size and bases on a few loops where the row/collumn ID determine the location for the spawned tile

Create a new Actor, in Event Graph paste this code
And in Construction Script this code

In case you’re missing Functions:
Add plane
Add X

I documented every single step so you can understand what’s happening there and I hope you’ll be able to implement this in your project