Skip to content

Commit

Permalink
Fixed brush matrix when using groups with a rotation and translation
Browse files Browse the repository at this point in the history
  • Loading branch information
Nestorboy committed Dec 20, 2024
1 parent 1e51e3f commit d163194
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/preview/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,6 @@ class Preview {
brush_coord.x += 8;
brush_coord.z += 8;
}
brush_matrix.multiplyMatrices(intersect.object.parent.matrixWorld, brush_matrix);

// Z-fighting
let z_fight_offset = Preview.selected.calculateControlScale(brush_coord) / 8;
Expand All @@ -1139,7 +1138,7 @@ class Preview {
let scale = new THREE.Vector3(BarItems.slider_brush_size.get(), BarItems.slider_brush_size.get(), 1);
brush_matrix.scale(scale);

brush_matrix.multiplyMatrices(intersect.object.matrix, brush_matrix);
brush_matrix.multiplyMatrices(intersect.object.matrixWorld, brush_matrix);
Canvas.brush_outline.matrix = brush_matrix;
}

Expand Down

0 comments on commit d163194

Please sign in to comment.