Spawn Procedural Mesh with angle

Hi there,
hoping someone can help me to solve a problem I have with procedural mesh.

I am trying to create a dynamic blueprint that giving the number of meshes and an angle it will spawn a number of procedural meshes.
For example if I input 4 meshes with an angle of 90 degree it will spawn 4 meshes that will create a square (as the picture below:

Right now I found the way to spawn the meshes and add an angle to them, it works only on the first two mashes then the rotation goes off. I have calculated the COS and SIN of the location of the mesh but its not working properly. I am missing how to get the next meshes location and spawn one next to the other in the right location.

Sor far I have this in my blueprint.

Hope Someone can Help me to get this fixed.

Try this:

Panels

I hope it’ll be helpful for you.

My Products

1 Like

Thank you so much, it will work also if I have a grid? Because if I had a loop for mesh high ( grid 4 by 4 for example)

Grid 4x4:

1 Like

Thank you :pray: :pray:
Its a very clean and easy solution. I was getting mad with math.