cargo fmt

This commit is contained in:
Sébastien Crozet
2023-11-04 17:56:13 +01:00
parent aa546225a4
commit fb3eee502c
2 changed files with 5 additions and 3 deletions

View File

@@ -1485,7 +1485,10 @@ fn highlight_hovered_body(
}
if let Some(cursor) = window.cursor_position() {
let ndc_cursor = Vec2::new(cursor.x / window.width() * 2.0 - 1.0, 1.0 - cursor.y / window.height() * 2.0);
let ndc_cursor = Vec2::new(
cursor.x / window.width() * 2.0 - 1.0,
1.0 - cursor.y / window.height() * 2.0,
);
let ndc_to_world = camera_transform.compute_matrix() * camera.projection_matrix().inverse();
let ray_pt1 = ndc_to_world.project_point3(Vec3::new(ndc_cursor.x, ndc_cursor.y, -1.0));
let ray_pt2 = ndc_to_world.project_point3(Vec3::new(ndc_cursor.x, ndc_cursor.y, 1.0));