We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28ae21e commit fc24bc6Copy full SHA for fc24bc6
examples/tools/scene_viewer.rs
@@ -342,15 +342,15 @@ fn camera_controller(
342
mouse_delta += mouse_event.delta;
343
}
344
345
- for (mut transform, mut options) in query.iter_mut() {
+ if let Ok((mut transform, mut options)) = query.get_single_mut() {
346
if !options.initialized {
347
let (_roll, yaw, pitch) = transform.rotation.to_euler(EulerRot::ZYX);
348
options.yaw = yaw;
349
options.pitch = pitch;
350
options.initialized = true;
351
352
if !options.enabled {
353
- continue;
+ return;
354
355
356
// Handle key input
0 commit comments