bevy_lunex
bevy_lunex copied to clipboard
can't use multiple cameras
Using multiple cameras is quite common, for example with a HUD or minimap. Currently, this line panics when multiple cameras exist: https://github.com/bytestring-net/bevy-lunex/blob/672d977d793bd215f46bcbc44a8277b3c413d81f/crates/bevy_lunex_ui/src/code/cursor.rs#L64
Perhaps tag the expected camera with a LunexCamera
component and add that to the query.
So instead of this query:
cameras: Query<(&Camera, &Transform), Without<Cursor>>
you'd have this:
cameras: Query<(&Camera, &Transform, &LunexCamera), Without<Cursor>>
Maybe we can tie the camera type to the cursor with an associated type like I do with interaction sources.
The solution for cursor currently in place is just something that "works", but is also a placeholder for deeper, more thought out system, so I can focus on more hot problems. This would be patching something that will be changed in the future. Im very busy as of now, but if someone made PR i would gladly merge it for the reasons stated above. Otherwise feel free to comment any cursor changes you have in mind, we have a lot of work to do on that one 💯, so we need to brainstorm ideas and solutions (like camera rotation and 3D in general)
From version 0.1.0
and forward multiple cameras are supported