Why do you want to use a third-party script? You can accomplish this with relative ease, depending on the algorithm you choose to devise.
Use a diagram to divide the affected areas into "terrain space" and construct each brick as a vertex within the permitted space. Afterwards, it should be much easier to design the algorithm to function with your game accurately. |