Skip to content

Commit

Permalink
fix child transform
Browse files Browse the repository at this point in the history
  • Loading branch information
rewin123 committed Oct 15, 2024
1 parent 061a880 commit 04ca0ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions crates/editor_ui/src/camera_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,8 @@ fn set_camera_viewport(
ui_state.need_reinit_egui_tex = false;
}

let Ok(
[(mut real_cam, _, mut real_cam_local_transform), (watch_cam, camera_transform, _)],
) = cameras.get_many_mut([real_cam_entity, camera_entity])
let Ok([(mut real_cam, _, mut real_cam_local_transform), (watch_cam, camera_transform, _)]) =
cameras.get_many_mut([real_cam_entity, camera_entity])
else {
if let Ok((mut real_cam, _, _)) = cameras.get_mut(real_cam_entity) {
real_cam.is_active = false;
Expand Down
4 changes: 3 additions & 1 deletion crates/editor_ui/src/tools/gizmo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,9 @@ impl EditorTool for GizmoTool {
if let Some(parent) = cell.get_entity(parent.get()) {
if let Some(parent_global) = unsafe { parent.get::<GlobalTransform>() } {
if let Some(global) = unsafe { ecell.get::<GlobalTransform>() } {
if let Some((_, transforms)) = Gizmo::new(gizmo_config).interact(
self.gizmo.update_config(gizmo_config);

if let Some((_, transforms)) = self.gizmo.interact(
ui,
&[bevy_to_gizmo_transform(&global.compute_transform())],
) {
Expand Down

0 comments on commit 04ca0ea

Please sign in to comment.