Hello, I'm working on a triangle terrain generator, and already have node generation (using math.noise), but don't have the faintest clue how to go about creating triangles between nodes to create the actual terrain.
What should I do? Are there any tutorials I should read, any advice you have?
stravant wrote the original triangle fill code that most if not all triangle fill plugins use in some fashion:
001 | local function setupPart(part) |
002 | part.Anchored = true |
003 | part.FormFactor = 'Custom' |
004 | part.CanCollide = PolyDraw.CanCollide |
005 | part.BrickColor = PolyDraw.BrickColor |
006 | part.TopSurface = 'Smooth' |
007 | part.BottomSurface = 'Smooth' |
008 | end |
009 |
010 | function CreateTriangle(parent, a, b, c) |
011 | local this = { } |
012 | local mPart 1 = Instance.new( 'WedgePart' ) |
013 | setupPart(mPart 1 ) |
014 | local mPart 2 = Instance.new( 'WedgePart' ) |
015 | setupPart(mPart 2 ) |
If you want to recreate the features that a specific plugin has, look into its code to see how its modified stravant's fill.