I am making a endless runner and i have a system wich spawns tiles of a specific size. My character doesn’t move, but all other actors move along the x axis, using a component.
This is the spawning of my first 10 tiles at begin play. I have a actor placed in the world, that handles the whole system:
This is the spawning of every new tile, after the game has started. After one tile hits the bounds of the level (which i made using a collision box), it destroys it and runs the spawning.
Here are the SpawnLine and SpawnedLineLocationSet:
As you can see, i set the rear tile and spawn every other tile 500 units behind it. I am 100% sure that the tiles are 500 units long.
The problem that occurs is, that when the tiles start moving, they start to spawn slighly into each other. This causes the z-fighting. I am not sure how to counter this problem, as i am a noob, so any help will be appreciated.
Thanks in advance!