diff --git a/examples/picking/src/main.rs b/examples/picking/src/main.rs index 4224cba59..b7f787a66 100644 --- a/examples/picking/src/main.rs +++ b/examples/picking/src/main.rs @@ -34,7 +34,7 @@ pub async fn run() { PhysicalMaterial::new_opaque( &context, &CpuMaterial { - albedo: Srgba::new(100, 100, 100, 0), + albedo: Srgba::new(255, 255, 0, 255), ..Default::default() }, ), @@ -114,7 +114,9 @@ pub async fn run() { position, monkey.into_iter().chain(&cone).chain(&instanced_mesh), ) { - pick_mesh.set_transformation(Mat4::from_translation(pick.position)); + pick_mesh.set_transformation( + Mat4::from_translation(pick.position) * Mat4::from_scale(0.3), + ); match pick.geometry_id { 0 => { monkey.material.albedo = Srgba::RED; diff --git a/src/renderer.rs b/src/renderer.rs index 2bf6a3f58..4a740bdce 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -623,7 +623,7 @@ pub fn ray_intersect( let camera = Camera::new_orthographic( viewport, position, - position + direction * max_depth, + position + direction, up, 0.01, 0.0,