How do I combine 2 parts using code?

What I want to do here is combine multiple parts into one part. I want to use this for terrain generation since combining each individual part into one should make a HUGE performance enhancement

The image above shows what I mean by this, by where the parts on the right are not combined, but the parts on the left are

Think I made that clear, but how would this be possible? Remember, this is being used in generated terrain

I’m now thinking that different generation math could be used with part sizes and positions, but I don’t know how to do that math, so if you know how to do that, that would be a massive help as well

this post should help a lot

3 Likes

It worked! It is slow but I won’t be generating much terrain at one time so that’s not much of an issue

1 Like

You probably shouldn’t do this. If your terrain actually is made up of blocks like you’ve shown, there’s definitely a better method. Unions aren’t efficient and will likely slow down your generation and the game more than if you found a method which just uses rescaling parts. For that, I don’t have a particular answer, but I think there should be some resources here on the forums regarding that.

Right, I’ll have a look into it

1 Like

any results as to how you end up generating the terrain

take a look at this.

1 Like