Copying Terrain Regions and Pasting in Specific Places

I wish to create a randomly generated asteroid field.
Currently, I wish to pre-make asteroids then paste them into random locations in-game.

I’m unsure how to get the region3 of each asteroid so i can copy ot save it. I also tend to have problems when dealing with terrain via scripts, and the API is confusing.

What’s the easiest/best way to find the regions, copy them, and paste them into desired locations?

You can use Terrain:CopyRegion to achieve so. Description:-
Stores a chunk of terrain into a TerrainRegion object so it can be loaded back later. Note: TerrainRegion data does not replicate between server and client.

The params are only one, which is Region3int16. It’s like the complex version o f

Wait a a minute, so are the asteroids made of terrain?

1 Like

The asteroids are made of terrain yes. Though I have no clue how to check what region 3 the asteroids are in.

Calculate it using the asteroid’s size and position