MeshRayCast has intersections not on the surface of the mesh
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version and features
0.19.1 with features default and free_camera
## What you did
I cast a ray from camera using MeshRayCast to the meshes I loaded and visualize the first intersection using gizmos.
[A small code base](https://github.com/yh1970/bevy_meshraycast_debug) for reproduction
## What went wrong
- what were you expecting?
All intersections should be just on the surfaces of meshes
- what actually happened?
Some intersections are inside the meshes or just in the air.
correct
inside
in the air
## Additional information
MeshRayCast works on the suzanne model but not on the zombie model.
Contributor guide
Research direction
Start by running the linked bevy_meshraycast_debug reproduction with Bevy 0.19.1 and compare MeshRayCast results for the Suzanne and zombie models. Trace the ray setup, mesh transforms, and gizmo visualization to determine where the reported intersections diverge from the mesh surface. Done means intersections are consistently on the loaded mesh surfaces for both models.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100