weraso.blogg.se

Diablo 3 forums ptr feedback
Diablo 3 forums ptr feedback










Local neighborOccupancies, fullNeighbor ,emptyNeighbor = getNeighborOccupancies(occupancies, ix, iy, iz) Local desiredOccupancy = 1 - brushOccupancy 5 and (cellMaterial = materialAir or cellMaterial = materialWater) then If cellMaterial = materialAir or cellMaterial = materialWater or cellOccupancy cellOccupancy then If cellMaterial ~= materialAir and cellMaterial ~= nearMaterial then 5)īrushOccupancy = xOutside * yOutside * zOutside Local zOutside = 1 - math.max( 0, math.abs(cellVectorZ / resolution) +. Local yOutside = 1 - math.max( 0, math.abs(cellVectorY / resolution) +. Local xOutside = 1 - math.max( 0, math.abs(cellVectorX / resolution) +. If not (snapToGrid or forceSnapToGrid) then 5 * resolution - distance) / resolution)) 5)īrushOccupancy = math.max( 0, math.min( 1, (radius +. MagnitudePercent = s( math.min( 1, distance / (radius + resolution *. Local distance = math.sqrt(cellVectorX * cellVectorX + cellVectorY * cellVectorY + cellVectorZ * cellVectorZ) Modules(centerPoint, materials, occupancies, resolution, selectionSize, strength, desiredMaterial, brushShape, minBounds, maxBounds) Air then -dig ZĭesiredMaterial = isDynamic and nearMaterial or materialDictionary Local middle = materials -This little section of code sets nearMaterial to middle of matrix Local materials, occupancies = terrain: ReadVoxels(region, resolution) y + radius) / resolution), math.ceil((centerPoint. x + radius) / resolution), math.ceil((centerPoint. y - radius) / resolution), math.floor((centerPoint. x - radius) / resolution), math.floor((centerPoint.

diablo 3 forums ptr feedback

Local desiredMaterial = isDynamic and nearMaterial or materialDictionary Return linePoint + lineDirection * distance Local distance = ((planePoint - linePoint): Dot(planeNormal)) / denominator Local denominator = lineDirection: Dot(planeNormal) unit -this code is for 45 degree plane lockingįunction lineToPlaneIntersection( linePoint, lineDirection, planePoint, planeNormal) Return Vector3.new(0, 0, cameraLookVector.z / absz) ]] Return Vector3.new(cameraLookVector.x / absx, 0, 0)

diablo 3 forums ptr feedback

Return Vector3.new(0, cameraLookVector.y / absy, 0)

diablo 3 forums ptr feedback

If neighbor = absx and absy >= absz then -preference towards y axis planes












Diablo 3 forums ptr feedback