i assume you only spawn them on a plane.
so first thing the distance,
Make a Vector variable with 0,0,100 for example.“Direction”
Make a loop for the number of meshes you want to spawn, lets say 15 ok?
i use add static mesh component, be aware that he use the relative transform, make a new transform and feed in the “Direction” from before for the location
The rotation is tricky .
Now use “rotate the vector” on your “Direction”, and use again the 360/Nmesh as angle. Set this new rotated vector to “Direction”.
Repeat the loop until all meshes are placed.
For the rotation set the Z rotation you have to play with it a little , i am not sure
basically you want to set it to something like Index of loop* 360/Nmesh.
If you add 15 mesh , 360/15 = 24 degrees,
the firist second and third mesh should be rotated of 24 - 48 - 72 - 96
based on the relative transform and starting direction you have to add another “something” 0-90-180-270