I just made it closer to what bevy does. I think technically what bevy is doing is more correct, as it has the NDC coordinates of the ray origin starting exactly at the near plane (Z=1).
I ran the simplified_mesh example and it's still working as expected. If you print the calculated near and far coordinates for the ray, you'll see that this change makes the ray start at the world-space near plane (Z=-0.1).
I just made it closer to what bevy does. I think technically what bevy is doing is more correct, as it has the NDC coordinates of the ray origin starting exactly at the near plane (Z=1).
I ran the
simplified_mesh
example and it's still working as expected. If you print the calculatednear
andfar
coordinates for the ray, you'll see that this change makes the ray start at the world-space near plane (Z=-0.1).