How can I make part terrain modification?

One of my favorite Roblox games has this mechanic where you can build trenches on terrain made with BaseParts and the terrain is not flat. Does anyone know how to do this?

1 Like

It looks like it makes a hole in the triangle terrain by removing every cell that overlaps the model being placed. It can then fit the edges of the hole to some terrain bits in the model by triangulating the ring-ish-shaped bits that are still empty. Since those bits aren’t in the shape of a triangle, the hole has to be triangulated so it can be filled in with triangle terrain.

This shows the general idea from a top down perspective:

image

There are algorithms for triangulating a shape like that.

3 Likes