bevy_mod_raycast
bevy_mod_raycast copied to clipboard
Expose mesh indices in intersection data
Note: I also ran cargo fmt, which reformatted src/primitives.rs since it used carriage returns.
Hi @aevyrie, is this PR something you'd consider accepting?
Yes, but I need some free time to review this. I'm not sure how much data we should stuff in this struct, or just return the indices and make the user look up things like vertex positions and normals.
No problem. I'm using this data in tandem with bevy_mod_picking. I was looking at the other backends and saw that rapier exposes the data using a struct called feature id.
Maybe we could figure out the best way to expose the intersection data from rapier in the HitData and then work backwards for this backend?
Just saw this PR. I have opened a similar PR which exposes just the indices. See: #107
Closed in favor of #103.