I’m trying to create a blueprint where I spawn static meshes along a certain axis, but allow the user to rotate the meshes. However, when a mesh is rotated, the new mesh follows the new direction from the previously rotated mesh. The problem I have is getting the new position. Is there an easy way to do this?
For instance, if my cube is spawned at 0,0,0 and the spacing for the next one is 10,0,0 but that mesh is rotated 45 degrees. The third spawned mesh would not be at 20,0,0 but something like 15,5,0. How do I determine that position?
Below, R is the distance from the axis of the object to the predetermined spacing value. If I was going in 1 direction, X would always be the same. However, once I rotate it, X becomes less and Y begins to get a value based on that.