From 9bfbade9a2e9747e793dcfd37d205358ab14eb54 Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 19 Mar 2025 23:13:49 -0700 Subject: [PATCH] refactor: make cylinders go on the XZ plane by default --- src/nodes/fields.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nodes/fields.rs b/src/nodes/fields.rs index 3214009..dbef5cc 100644 --- a/src/nodes/fields.rs +++ b/src/nodes/fields.rs @@ -184,7 +184,7 @@ impl FieldTrait for Field { v.length() + q.x.max(q.y.max(q.z)).min(0_f32) } Shape::Cylinder(CylinderShape { length, radius }) => { - let d = vec2(p.xy().length().abs() - radius, p.z.abs() - (length * 0.5)); + let d = vec2(p.xz().length().abs() - radius, p.y.abs() - (length * 0.5)); d.x.max(d.y).min(0.0) + d.max(vec2(0.0, 0.0)).length() } Shape::Sphere(radius) => p.length() - radius,