diff --git a/crates/bevy_picking_core/src/events.rs b/crates/bevy_picking_core/src/events.rs index 21a82144..181a2131 100644 --- a/crates/bevy_picking_core/src/events.rs +++ b/crates/bevy_picking_core/src/events.rs @@ -250,8 +250,8 @@ pub fn pointer_events( if let PressDirection::Up = press_event.direction { let Some(location) = pointer_location(press_event.pointer_id) else { error!( - "Unable to get location for pointer {:?}", - press_event.pointer_id + "Unable to get location for pointer {:?} during event {:?}", + press_event.pointer_id, press_event ); continue; }; @@ -271,8 +271,8 @@ pub fn pointer_events( if let PressDirection::Down = press_event.direction { let Some(location) = pointer_location(press_event.pointer_id) else { error!( - "Unable to get location for pointer {:?}", - press_event.pointer_id + "Unable to get location for pointer {:?} during event {:?}", + press_event.pointer_id, press_event ); continue; }; @@ -298,7 +298,10 @@ pub fn pointer_events( .any(|e| e.contains_key(&hovered_entity)) { let Some(location) = pointer_location(pointer_id) else { - error!("Unable to get location for pointer {:?}", pointer_id); + error!( + "Unable to get location for pointer {:?} during pointer over", + pointer_id + ); continue; }; pointer_over.send(Pointer::new( @@ -322,7 +325,10 @@ pub fn pointer_events( .any(|e| e.contains_key(&hovered_entity)) { let Some(location) = pointer_location(pointer_id) else { - error!("Unable to get location for pointer {:?}", pointer_id); + error!( + "Unable to get location for pointer {:?} during pointer out", + pointer_id + ); continue; }; pointer_out.send(Pointer::new( @@ -466,7 +472,10 @@ pub fn send_click_and_drag_events( continue; }; let Some(location) = pointer_location(press.pointer_id) else { - error!("Unable to get location for pointer {:?}", press.pointer_id); + error!( + "Unable to get location for pointer {:?} during event {:?}", + press.pointer_id, press + ); continue; }; diff --git a/crates/bevy_picking_input/src/touch.rs b/crates/bevy_picking_input/src/touch.rs index e63ec37a..355c3fb0 100644 --- a/crates/bevy_picking_input/src/touch.rs +++ b/crates/bevy_picking_input/src/touch.rs @@ -5,10 +5,7 @@ use bevy_hierarchy::DespawnRecursiveExt; use bevy_input::touch::{TouchInput, TouchPhase}; use bevy_math::Vec2; use bevy_render::camera::RenderTarget; -use bevy_utils::{ - tracing::{debug, info}, - HashMap, HashSet, -}; +use bevy_utils::{tracing::debug, HashMap, HashSet}; use bevy_window::{PrimaryWindow, WindowRef}; use bevy_picking_core::{ @@ -46,7 +43,7 @@ pub fn touch_pick_events( }; match touch.phase { TouchPhase::Started => { - info!("Spawning pointer {:?}", pointer); + debug!("Spawning pointer {:?}", pointer); commands.spawn(( PointerCoreBundle::new(pointer).with_location(location.clone()), #[cfg(feature = "selection")] @@ -61,7 +58,7 @@ pub fn touch_pick_events( // Send a move event only if it isn't the same as the last one if let Some(last_touch) = location_cache.get(&touch.id) { if last_touch == touch { - break; + continue; } input_moves.send(InputMove::new( pointer,