We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minimal code to reproduce:
use bevy::prelude::*; use bevy_mod_picking::prelude::*; fn main() -> AppExit { let mut app = App::new(); app.add_plugins(( bevy::DefaultPlugins, bevy_mod_picking::DefaultPickingPlugins, )); app.add_systems(Startup, |mut commands: Commands, mut meshes: ResMut<Assets<Mesh>>, mut materials: ResMut<Assets<StandardMaterial>>| { commands.spawn(Camera3dBundle{ transform: Transform::from_xyz(0.0, 0.0, 5.0), ..Default::default() }); commands.spawn(( SpatialBundle::default(), On::<Pointer<Select>>::run(|listener: Listener<Pointer<Select>>| { println!("Select {:?}", listener.listener()) }), On::<Pointer<Deselect>>::run(|listener: Listener<Pointer<Deselect>>| { println!("Deselect {:?}", listener.listener()) }), On::<Pointer<Click>>::run(|listener: Listener<Pointer<Click>>| { println!("Click {:?}", listener.listener()) }), On::<Pointer<Over>>::run(|listener: Listener<Pointer<Over>>| { println!("Over {:?}", listener.listener()) }), On::<Pointer<Out>>::run(|listener: Listener<Pointer<Out>>| { println!("Out {:?}", listener.listener()) }), )).with_children(|b| { b.spawn(( PbrBundle { mesh: meshes.add(Cuboid::default()), material: materials.add(StandardMaterial { base_color: Color::WHITE, ..Default::default() }), ..Default::default() }, )); }); }); app.run() }
Outputs when I move cursor onto the cuboid, click, release, move cursor out:
Over Entity { index: 3, generation: 1 } Click Entity { index: 3, generation: 1 } Out Entity { index: 3, generation: 1 }
It seems inconsistent that both over/out and click work on child entities but selection does not.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Minimal code to reproduce:
Outputs when I move cursor onto the cuboid, click, release, move cursor out:
It seems inconsistent that both over/out and click work on child entities but selection does not.
The text was updated successfully, but these errors were encountered: