Download

Floor Generation

Hello,

I am working on a side scroller (3d), I am looking for a way to generate floor tile then taking the previous floor tile and relocating it to a new position (in front) so that i don’t have to delete actor and respawn it in again.
I have the array with all the scene components from my tile blueprint, i need to find how to spawn and teleport these components to a new location without them overlaping and all in good timing so that i wouldn’t fall in thin air! ^^

Thank you.

Its a pretty simple concept and used quite often throughout games.

Essentially all you need to know is how big your Tiles are so that you can calculate the offset to the following tile to avoid overlaps.

As for when to actually move and place the next tile you could try adding a Collision component to your Character and when a Tile exits that collision component you know that it is a tile that needs to be moved. Alot of games tend to generate tiles beyond the bounds of the Players Screen to avoid running into a situation where the player sees tiles being generated and removed.

Just a few things for you to consider.

Good luck.

Ok, i think i get it, but they won’t be destroyed then generated ? I want them to teleport to a new location to minimize the work (for the engine) for better perfomance.

I’ll see what i come up with thank you the answer, good day!