[OCC & VIS] How to pick a face?

Hi,
I followed the example in the tutorial, but it does not work correctly. What should I do?
The following is part of my code:
class CustomInteractiveStyle : public vtkInteractorStyleTrackballCamera{
......
void OnLeftButtonDown() override{

vtkInteractorStyleTrackballCamera::OnLeftButtonDown();
picker->SetSelectionMode(SM_Face);
Standard_Integer pickPosition[2]{0};
this->GetInteractor()->GetEventPosition(pickPosition);
picker->Pick(pickPosition[0],pickPosition[1],0);
vtkSmartPointer<vtkActorCollection> actorCollection = picker->GetPickedActors();
......
}
......
}

I have set the Render for picker, actorCollection->GetNumberOfItems() is always 0.Can you help me?
Thanks!

liao weidong's picture

Hi,Have you solved the problem yet?

club660's picture

same problem here!

Yoli Geh's picture

I have the same problem, have you found a solution?

Or anyone have an idea for a workaround?