Skip to content

Commit

Permalink
fix break
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoleKai committed Apr 29, 2024
1 parent ae34b77 commit 7df78b2
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,14 +527,20 @@ fn grab_gizmo(
initial_transform_query: Query<Entity, With<InitialTransform>>,
) {
if mouse_button_input.just_pressed(MouseButton::Left) {
for (mut gizmo, mut interaction, _transform) in gizmo_query.iter_mut() {
if *interaction == PickingInteraction::Hovered {
for (selection, transform, entity, rotation_origin_offset) in
for (mut gizmo, interaction, _transform) in gizmo_query.iter_mut() {
// if *interaction == PickingInteraction::Hovered {
// for (selection, transform, entity, rotation_origin_offset) in
// selected_items_query.iter()
// {
// ev_gizmo_update.send(GizmoUpdate::Hover { entity });
// }
// *interaction = PickingInteraction::Pressed;
if *interaction == PickingInteraction::Pressed {
for (_selection, _transform, entity, _rotation_origin_offset) in
selected_items_query.iter()
{
ev_gizmo_update.send(GizmoUpdate::Hover { entity: entity });
ev_gizmo_update.send(GizmoUpdate::Grab { entity });
}
*interaction = PickingInteraction::Pressed;
// Dragging has started, store the initial position of all selected meshes
for (selection, transform, entity, rotation_origin_offset) in
selected_items_query.iter()
Expand Down

0 comments on commit 7df78b2

Please sign in to comment.