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

Camera queries can be simplified #14

Closed
tguichaoua opened this issue Feb 1, 2022 · 1 comment
Closed

Camera queries can be simplified #14

tguichaoua opened this issue Feb 1, 2022 · 1 comment

Comments

@tguichaoua
Copy link

Following queries can be simplified using With filter, since FlyCam is just a marker component.

bevy_flycam/src/lib.rs

Lines 59 to 62 in 100a15d

mut query: Query<(&FlyCam, &mut Transform)>,
) {
let window = windows.get_primary().unwrap();
for (_camera, mut transform) in query.iter_mut() {

bevy_flycam/src/lib.rs

Lines 94 to 97 in 100a15d

mut query: Query<(&FlyCam, &mut Transform)>,
) {
let window = windows.get_primary().unwrap();
for (_camera, mut transform) in query.iter_mut() {

     mut query: Query<&mut Transform, With<FlyCam>>,
 ) { 
     let window = windows.get_primary().unwrap(); 
     for mut transform in query.iter_mut() { 
@BlackPhlox
Copy link
Collaborator

Closed by #16 being merged 🚀

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

2 participants