Pointer Index and virtual index in VR

How to set pointer index and virtual index in order to make two controllers work the same with 3D widget interactions