bevy_mod_billboard icon indicating copy to clipboard operation
bevy_mod_billboard copied to clipboard

Feature request: Possibility for interaction

Open bardt opened this issue 1 year ago • 1 comments

I need a possibility to track hover and press events on a billboard.

I tried to achieve it using bevy_mod_picking crate and exposing the meshes like this:

fn add_billboard_mesh(
    mut commands: Commands,
    billboards: Query<(Entity, &BillboardMeshHandle), Added<BillboardMeshHandle>>,
) {
    for (entity, mesh_handle) in billboards.iter() {
        let handle = mesh_handle.0.clone();
        commands.entity(entity).insert(handle);
    }
}

but meshes from BillboardMeshHandle are positioned on screen differently from where the billboard would be rendered, and raycasting triggers in a wrong screen area:

image

bardt avatar Jul 31 '23 17:07 bardt