Skip to content

Commit af2666d

Browse files
committed
refactor: make cylinders go on the XZ plane by default
1 parent eae98a6 commit af2666d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nodes/fields.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ impl FieldTrait for Field {
184184
v.length() + q.x.max(q.y.max(q.z)).min(0_f32)
185185
}
186186
Shape::Cylinder(CylinderShape { length, radius }) => {
187-
let d = vec2(p.xy().length().abs() - radius, p.z.abs() - (length * 0.5));
187+
let d = vec2(p.xz().length().abs() - radius, p.y.abs() - (length * 0.5));
188188
d.x.max(d.y).min(0.0) + d.max(vec2(0.0, 0.0)).length()
189189
}
190190
Shape::Sphere(radius) => p.length() - radius,

0 commit comments

Comments
 (0)