Issue with Multi Touch Screens.

I am currently working on a project which is using three touch sensors with two displays. I am having an issue with mapping the touches to the correct display.

This diagram shows the desired mapping:alt text

So to do this I am using this:

void Update () {
        Debug.Log(Input.touchCount);
        for (int i = 0; i < Input.touches.Length; i++)
        {
            Touch touch = Input.GetTouch(i);
            if (touch.phase == TouchPhase.Began)
            {
                Ray ray = Camera.main.ScreenPointToRay(touch.position);
                Debug.DrawRay(ray.origin, ray.direction * 10, Color.yellow);
            }
        }
    }

The issue is that every touch to any sensor is showing on Display1. I believe this is down to: Camera.main.ScreenPointToRay(touch.position);

But I cant find a way to detect which screen is being touched to use the correct camera. Is there a way around this issue?

Did you figure this out?

This works for the unity editor, it needs to be changed to work with the player for whatever OS you are using.
It returns a Vector3 where the z index is the displayID.

public static Vector3 DebugRelativeMouseAt()
    {
        var mouseOverWindow = EditorWindow.mouseOverWindow;
        System.Reflection.Assembly assembly = typeof(UnityEditor.EditorWindow).Assembly;
        Type type = assembly.GetType("UnityEditor.GameView");

        int displayID = 0;
        if (type.IsInstanceOfType(mouseOverWindow))
        {
            var displayField = type.GetField("m_TargetDisplay", BindingFlags.NonPublic | BindingFlags.Instance);
            displayID = (int)displayField.GetValue(mouseOverWindow);
        }

        var pos = Input.mousePosition;
        pos[2] = displayID;
        return pos;
    }

I have a similar issue with my app.
I m using 4 different cameras to display on 4 touchscreens. On each touchscreen i have a canvas and I need to use touch event to pan/zoom the content on each canvas.
However I always get the touch on every single canvas, and only on the actual canvas touched.

I haven’t found any solution yet.,

wow im in the same exact boat! two touch monitors and it seams like i can hit buttons on the canvas of the second screen but my touch.position is always on the first screen