Endless car game (blueprint doubts)

313350-4.png

Hey,
I am working on a basic endless racing game.
I have managed to make the platform move behind the car and now I want to spawn some buildings next to this platform and I want them to move behind with the main platform as well.

Some of the Issues/ doubts the I have are mentioned below
1- I want the meshes to avoid any clipping within and also I don’t want them to be separated by a large distance (as close as possible). The way I have done this is using construction script

2- What is the best way to spawn random buildings instead of just one spawning all over, how I am doing is to create an array ‘BuildingMesh’ with setting all the InstanceStaticMesh in this array. But I am not seeing anything getting spawned.

3- Also, How can I add a random road on side platforms which shouldn’t clip with any of the buildings
4- How to change pivot of a static mesh

313350-4.png

Event begin play only fires once so setting your array here is fine. When it comes to spawning all of the objects or changing one specific object as time progresses, you will need to use event tick or a timer by event (I recommend the latter). With that, you should be able to utilize a random int in range to determine which mesh to use and simply change the mesh and the orientation as the timer runs.