how to switching interactorStyle?

  1. 3 objects receive the trackballcamera event (simultaneous rotation).
  2. Select object #1. (pickingInteratorStyle definition)
  3. Only object 1 is rotated. (trackballActor applied)
  4. After deselecting object 1, the 3 objects rotate together.

After selecting an object, it is successful to rotate only the selected object.
How do I make 3 objects rotate at the same time after deselecting

//customize interactorstyle
class pickingInteractorStyle : public vtkInteractorStyleTrackballCamera
{
public:
static pickingInteractorStyle* New();
vtkTypeMacro(pickingInteractorStyle, vtkInteractorStyleTrackballCamera);

virtual void OnLeftButtonDown() override
{
		int* clickPos = this->GetInteractor()->GetEventPosition();

		// Pick from this location.
		vtkNew<vtkPropPicker> picker;

		auto pickedActor = picker->GetActor();
		
		//select actor & change interactor style
		 if (pick_1 == pickedActor)
		{
			vtkNew<vtkInteractorStyleTrackballActor> style;					
			this->Interactor->SetInteractorStyle(style);
		}
}
virtual void OnLeftButtonDown() override
{
	//deselect object & 3 objects rotate....
}

}

vtkNew style;
style->SetDefaultRenderer(renderer);
renderWindowInteractor->SetInteractorStyle(style);
style->pick_1 = actor_1;

@jhp

Hello,
I’m trying to do the exact same thing, want to know if you found out a way to do it ?

Thanks