-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
What problem does this solve or what need does it fill?
It would be nice to be able to access RayMeshHit for Pointer<E> events. In cases, where meshes are observed for pointer events, it's impossible to get the triangle data without doing another raycast manually. It would be nice to be able to avoid the double work if Bevy could store and expose RayMeshHit data (when applicable) when Pointer observers are triggered.
What solution would you like?
Maybe we could add another optional field to HitData to contain triangle data of a hit mesh (but it kinda makes sense only for the mesh ray casting backend).
Or we could expose another resource where we'd store only mesh ray cast related data, accessible by a combination of PointerId and Entity.
What alternative(s) have you considered?
Atm, the only accessible workaround there seems to exist is to perform another ray cast on a pointer event (which would be great to be able to avoid).
Additional context
It would help a lot for diegetic UI implementation in bevy_egui.