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. 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) Return Vector3.new(0, cameraLookVector.y / absy, 0) If neighbor = absx and absy >= absz then -preference towards y axis planes
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |