aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src_testbed/debug_render.rs3
-rw-r--r--src_testbed/testbed.rs5
2 files changed, 5 insertions, 3 deletions
diff --git a/src_testbed/debug_render.rs b/src_testbed/debug_render.rs
index 2d87760..8b79edc 100644
--- a/src_testbed/debug_render.rs
+++ b/src_testbed/debug_render.rs
@@ -10,8 +10,7 @@ use rapier::pipeline::{
pub struct DebugRenderPipelineResource(pub DebugRenderPipeline);
#[derive(Default)]
-pub struct RapierDebugRenderPlugin {
-}
+pub struct RapierDebugRenderPlugin {}
impl Plugin for RapierDebugRenderPlugin {
fn build(&self, app: &mut App) {
diff --git a/src_testbed/testbed.rs b/src_testbed/testbed.rs
index 4c8a4a6..a3c9e6f 100644
--- a/src_testbed/testbed.rs
+++ b/src_testbed/testbed.rs
@@ -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));