Button in the attachment not clickable after adding BillboardComponent

I created some attachments by following the Diorama Apple example. Things have been working fine. I wanted to add BillboardComponent to my attachments. So I added it in this way

            
            guard let attachmentEntity = attachments.entity(for: component.attachmentTag) else { return }
            
            guard attachmentEntity.parent == nil else {return}
            
            
            var billBoard = BillboardComponent()
            billBoard.rotationAxis = [0,1,0]
            attachmentEntity.components.set(billBoard)

            content.add(attachmentEntity)
            attachmentEntity.setPosition([0.0, 0.5, 0.0], relativeTo: entity)

My attachment view is like this

                Text(name)
                    .matchedGeometryEffect(id: "Name", in: animation)
                    .font(titleFont)
                
                Text(description)
                    .font(descriptionFont)
                Button("Done") {
                    viewModel.arrows.remove(at: 0)
                }
                    
            }

If I remove the BillboardComponent then button click works fine. but with the `BillboardComponent button click doesn't work (not even highlighting when I look at it) in certain directions. How to resolve this issue?

Hi @rands

I tried to reproduce this issue, but was unable to. 2 things:

Here's the snippet I used to try to recreate the issue. Does it work for you?

struct ImmersiveView: View {
    let attachmentId = "some-attachment"
    var body: some View {
        RealityView { content, attachments in
            
            if let attachment = attachments.entity(for: attachmentId) {
                attachment.position = [0, 1.2, -1]
                attachment.components.set(BillboardComponent())
                content.add(attachment)
            }
        }
        attachments: {
            Attachment(id: attachmentId) {
                VStack {
                    Button("Click Me") {
                        print("Got click")
                    }
                }
                .padding(60)
                .glassBackgroundEffect()
            }
        }
    }
}

If the snippet works for you, please reply with a similar focused code snippet that reproduces the issue you mentioned so I can help you debug it.

Button in the attachment not clickable after adding BillboardComponent
 
 
Q