diff --git a/editor/src/main.rs b/editor/src/main.rs index a557dfb..d9e6dbc 100644 --- a/editor/src/main.rs +++ b/editor/src/main.rs @@ -4,7 +4,7 @@ use csg::{ plane::Plane, }; -fn generate_box_brush(position: Vec3, extent: Vec3) -> Brush { +fn generate_box_brush(position: Vec3, half_extent: Vec3) -> Brush { let normals = vec![ glam::vec3(1.0, 0.0, 0.0), glam::vec3(-1.0, 0.0, 0.0), @@ -16,7 +16,7 @@ fn generate_box_brush(position: Vec3, extent: Vec3) -> Brush { let mut brush_planes = vec![]; for normal in &normals { - let point = position + *normal * extent; + let point = position + *normal * half_extent; brush_planes.push(BrushPlane { plane: Plane::from_point_normal(point, *normal),