Skip to content

Commit

Permalink
Cleanup sizeCellClamped
Browse files Browse the repository at this point in the history
  • Loading branch information
mkargus committed Sep 24, 2024
1 parent caae308 commit 86a5b89
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Util/TerrainConverter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,7 @@ function TerrainConverter:FillBlock(material: Enum.Material, cframe: CFrame, siz

local regionSize = materialVoxels.Size

local sizeCellClamped = size / RESOLUTION
sizeCellClamped = Vector3.new(
math.min(1, sizeCellClamped.X),
math.min(1, sizeCellClamped.Y),
math.min(1, sizeCellClamped.Z))

local sizeCellClamped = (size / RESOLUTION):Min(Vector3.one)
local sizeCellsHalfOffset = size * (0.5 / RESOLUTION) + Vector3.new(0.5, 0.5, 0.5)

for x = 1, regionSize.X do
Expand Down

0 comments on commit 86a5b89

Please sign in to comment.