I’am using this code (if (GetComponent().pixelRect.Contains(Input.mousePosition))) for determine what camera under mouse cursor. When i rotate MainCamera all fine, but when i rotate Second camera first camera rotate too, because pixelRect MainCamera include pixelRect Second camera.
How determine what camera under mouse cursor is and rotate particular camera?
Logically, all cameras are watching the scene at all times unless instructed not to (disabled) and all cameras are receiving mouse input independently unless instructed not to.
The easiest way to solve this would be to make certain that you’re only rotating a specific, selected camera (or only utilizing the mouse position input from a specific camera), but there’s not an especially easy way to offer advice on what you can change without knowing what you’re already doing in your code.
An example of the code you’re using to handle the rotation (along with other important, related lines if applicable) would make it much easier to provide a clearer, more descriptive answer.