I have a sprite that can be picked:
commands.spawn((
Sprite::from_image(asset_server.load("Player1.png")),
Pickable::default(),
Transform::from_xyz(-490.0, -440.0, 1.0).with_scale(Vec3::new(2.2, 2.2, 1.0)),
))
.observe(on_dragged)
.insert(TowerDroppable {
dragging: false,
});
the first thing on_dragged does is println!("dragged");
this never gets run when dragging the sprite
I have a 3D and 2D camera, I have added the component "SpritePickingCamera" to both, when adding SpritePickingPlugin to the app I get an error saying it is already added, which is strange as in the documentation it says it is no longer in default plugins. However in the sprite picking example on the bevy website there is no SpritePickingPlugin added and the camera doesn't even have SpritePickingCamera, however the example works, and my code doesn't so I am confused on why this is occurring. If I add SpritePickingPlugin to the example I also get the same error: "Error adding plugin bevy_sprite::picking_backend::SpritePickingPlugin: : plugin was already added in application", so I am assuming the plugin is in DefaultPlugins even though the docs say it is not.