at that time, when control second camera with OrbitControls, main camera is controled.
why control? how to solve it? I want to only control second camera.
Because you are operating on the same canvas. And the same canvas is listened to. You need to separate what is to be moved/listened to separately, e.g. on hover.
This happens because OrbitControls attaches its event listeners to the same canvas element, so both controls end up reacting to the same pointer events. Even if the cameras are different, the input source is still shared.
One common solution is to explicitly pass the camera and DOM element when creating the controls instead of relying on defaults, so each OrbitControls instance is tied to the correct camera. Another option is enabling and disabling controls based on interaction context (like hover or focus), which is similar to what was shown above.
If you’re working with multiple scenes or views in the same canvas, another approach is separating them using viewports or scissor regions so each view handles its own camera interaction. That usually keeps the controls from interfering with each other.
The main thing is making sure only one OrbitControls instance is active for the current interaction target, otherwise both will try to process the same input events.