In the rapier backend, the ray_from_screenspace function does not correctly translate coordinates in the target camera s screen space to its viewport space before mapping to a world-space ray, leading to incorrect results. This can be fixed by adapting the ray_from_screenspace function to be closer to Ray3d::from_screenspace from bevy_mod_raycast: https://docs.rs/bevy_mod_raycast/latest/src/bevy_mod_raycast/primitives.rs.html#240-262
In the
rapier
backend, theray_from_screenspace
function does not correctly translate coordinates in the target camera s screen space to its viewport space before mapping to a world-space ray, leading to incorrect results. This can be fixed by adapting the ray_from_screenspace function to be closer toRay3d::from_screenspace
from bevy_mod_raycast: https://docs.rs/bevy_mod_raycast/latest/src/bevy_mod_raycast/primitives.rs.html#240-262