Spawn object in local position taking the current axis

Hi, I’m a little confused with calculating location of spawn
I want in procedurally way spawn X objects together one close to previous one
I have a base BP (book library) and want to spawn some books for no place them manually one by one.
The “problem” is to find the destiny target of the next spawn. I create and place a child component to set the first index/spawned book.
I guess the way to calculate it is adding a forward vector of previous spawned (X multiplied by new separation) and the world position, but the effect is not desired. If I make a rotation in the base BP, the result is different.
Somebody can guide me the common way to get the desired next location independently how is rotated?

You have to attach all your books to a component for example a “Scene Component” then they will follow that component rotation.
Generally to deal with level design challenges (Like placing objects in a pattern, randomized stuff and etc) best way is to create “Procedural Content”. Procedural Content is basically a blueprint that you can place in level, then set it’s properties in “Details” panel and it changes right in editor. It’s a very powerful tool to actually add stuff to unreal editor without messing around in source code. To create those you can add some public variables and use construction script in blue print to create something based on those values.

For example if you want to make a blueprint that you give it a “Static Mesh” , a “Gap” value and an “End Point” as input and it creates a series of that “Static Mesh” with “Gap” in a line staring at actor’s location and ending in “End Point”.

I have created a more complected Static Mesh Line Blueprint based on This Tutorial
You can alter this to make a library that starts at actor location and ends in End Point and randomly places books with a specific gap.

Amazing, pretty pretty cool!
Of course anybody has different goal, but without dude is perfect to take a reference to start.
Thank you ever so much!