So I have the main camera driving the main screen, and then a second camera with an inset view. I have each camera’s culling mask set to separate layers.
I would like to rotate CameraX if the person is holding down the button and moving the mouse back and forth over that layer (X). But if the person is holding down the button and moving the mouse over the inset layer (Y), then I want to rotate CameraY.
void Update() {
if (Input.GetMouseButton(0))
{
if[mouse clicked on layer X] {
cameraX.transform.eulerAngles += new Vector3(0, Input.GetAxis(“Mouse X”) * orbitingSpeed * Time.deltaTime, 0);
} else if [mouse clicked on layer Y] {
cameraY.transform.eulerAngles += new Vector3(0, Input.GetAxis(“Mouse X”) * orbitingSpeed * Time.deltaTime, 0);
}
}
}
** Sorry I don’t know how to properly format code in this forum yet.
There must be an easy way to do this, but I don’t know where to start or what to Google for.