-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
specialized_mesh_pipeline
example panics when hovering over mesh
#15891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
specialized_mesh_pipeline
example panics when hovering over mesh
I'm pretty sure something is malformed in the mesh. This looks like the exact issue spotted by @tbillington and called out as not a problem in #15800 (comment) by @Jondolf. |
It looks like it is because the mesh doesn't have normals. Don't feel like we should be packing there, but it seems like there's a pretty nasty perf hit to write non-packing code based on the discussion linked above. |
The line the panic is referring to is indexing the third vertex position for a triangle, not indexing a normal. The code does check if The panic happens because the example defines the mesh's indices as |
Cool, you're right, thanks. Opened a tiny PR to fix. |
# Objective Fixes #15891 ## Solution Just remove the invalid triangle. I'm assuming that line of code was originally copied from one that was drawing a quad. ## Testing - `cargo run --example specialized_mesh_pipeline` - hover over over the triangles Tested on macos
_Note from BD103: this PR was adopted from #16148. The majority of this PR's description is copied from the original._ # Objective Adds tests to cover various mesh picking cases and removes sources of panics. It should prevent users being able to trigger panics in `bevy_picking` code via bad mesh data such as #15891, and is a follow up to my comments in [#15800 (review)](#15800 (review)). This is motivated by #15979 ## Testing Adds 8 new tests to cover `ray_mesh_intersection` code. ## Changes from original PR I reverted the changes to the benchmarks, since that was the largest factor blocking it merging. I'll open a follow-up issue so that those benchmark changes can be implemented. --------- Co-authored-by: Trent <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Bevy version
main
bisected to #15800.
Relevant system information
SystemInfo { os: "MacOS 14.5 ", kernel: "23.5.0", cpu: "Apple M1 Max", core_count: "10", memory: "64.0 GiB" }
AdapterInfo { name: "Apple M1 Max", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
What you did
cargo run --example specialized_mesh_pipeline
What went wrong
The text was updated successfully, but these errors were encountered: