Skip to content
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

can't use multiple cameras #7

Closed
gamedevalice opened this issue Sep 21, 2023 · 3 comments
Closed

can't use multiple cameras #7

gamedevalice opened this issue Sep 21, 2023 · 3 comments

Comments

@gamedevalice
Copy link

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>>
@UkoeHB
Copy link
Contributor

UkoeHB commented Sep 21, 2023

Maybe we can tie the camera type to the cursor with an associated type like I do with interaction sources.

@IDEDARY
Copy link
Collaborator

IDEDARY commented Sep 23, 2023

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)

@IDEDARY
Copy link
Collaborator

IDEDARY commented May 24, 2024

From version 0.1.0 and forward multiple cameras are supported

@IDEDARY IDEDARY closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants