Skip to content

Commit

Permalink
Fix brush size control sizing.
Browse files Browse the repository at this point in the history
  • Loading branch information
rectalogic committed Feb 21, 2025
1 parent f9ce8ad commit 1b8e167
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui/brush_size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fn start_resize(
}
if let Some(world_position) = window_to_world(*window, camera, camera_transform) {
*brush_transform = Transform::from_translation(
Vec3::from((world_position, 0.)) - Vec3::new(brush.radius, -brush.radius, 0.),
Vec3::from((world_position, 0.)) - Vec3::new(0., -brush.radius, 0.),
)
.with_scale(Vec3::splat(brush.radius * 2.0));
commands.entity(brush_entity).insert(Visibility::Visible);
Expand All @@ -72,7 +72,7 @@ fn resize(
window_position_to_world(camera, camera_transform, moved.position)
{
let scale = brush_transform
.transform_point(Vec3::ZERO)
.translation
.distance(Vec3::from((world_position, 0.)));
brush.radius = scale;
brush_transform.scale = Vec3::splat(scale) * 2.0;
Expand Down

0 comments on commit 1b8e167

Please sign in to comment.