Fix rare failure

This commit is contained in:
rewin
2024-02-19 21:40:28 +03:00
parent c2473fee9f
commit 4c4646dcd8
+4 -2
View File
@@ -239,8 +239,10 @@ pub(super) fn on_rotate(
q_widget: Query<&RotationWidget>,
) {
// Components from the gizmo root (the entity being transformed)
let (mut xform, parent, init_xform, init_point, mut last_point, mut last_rotation) =
q_root.single_mut();
let Ok((mut xform, parent, init_xform, init_point, mut last_point, mut last_rotation)) =
q_root.get_single_mut() else {
return;
};
let gizmo_xform = q_gizmo.single();
let (cam, cam_xform) = q_camera.single();