bevy_mod_raycast icon indicating copy to clipboard operation
bevy_mod_raycast copied to clipboard

Raycasts do not hit bottoms of unrotated RayCastMeshes

Open sburris0 opened this issue 4 years ago • 0 comments

With the debug plugin it shows an arrow on top and on the sides: https://i.imgur.com/NuWP61u.png (and returns Some) on the bottom it doesn't seem to: https://i.imgur.com/DUajQG4.png

I did some investigating and rotating the mesh (in this case a Bevy cube) even slightly fixes this. It doesn't seem to be compared to epsilon, but rather if rotation == 0. For example, things work as expected if I rotate by Quat::from_axis_y(0.000001).

This should be reproducible by:

  1. Spawn a cube as part of a raycast set
  2. Set camera as raycast source (I'm using RayCastMethod::CameraScreenSpace(Vec2::zero()), not really sure what I'm doing tbh)
  3. With the debug plugin look at the bottom of the cube

sburris0 avatar Jan 31 '21 19:01 sburris0