From ca6f1e7cea31ef954550c8e848539142a20699c0 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Tue, 28 Dec 2021 18:38:10 +0000 Subject: [PATCH] //sculpt: sort pos{1,2}_compute --- worldeditadditions/lib/sculpt/apply.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/worldeditadditions/lib/sculpt/apply.lua b/worldeditadditions/lib/sculpt/apply.lua index 28307f7..d759ead 100644 --- a/worldeditadditions/lib/sculpt/apply.lua +++ b/worldeditadditions/lib/sculpt/apply.lua @@ -24,6 +24,10 @@ local function apply(pos1, brush_name, height, brush_size) local pos1_compute = pos1 - brush_size_radius local pos2_compute = pos1 + brush_size_radius + Vector3.new(0, height, 0) + pos1_compute, pos2_compute = Vector3.sort( + pos1_compute, + pos2_compute + ) -- 2: Fetch the nodes in the specified area, extract heightmap local manip, area = worldedit.manip_helpers.init(pos1_compute, pos2_compute)