Search Unity

Question How to detect eye pupil position and Rotation using camera in Unity

Discussion in 'XR Interaction Toolkit and Input' started by aqsanadeem82, Dec 22, 2022.

  1. aqsanadeem82

    aqsanadeem82

    Joined:
    Sep 15, 2018
    Posts:
    76
    So I am trying to create an environment where the player's task consists of classifying each object as “friend” or “enemy” and firing a bullet at the enemies while allowing friends to live. If the Player Clicks with the mouse on the object that is currently unknown, an arithmetic formula appears, the right result shows that it is a friend and the wrong shows it as an enemy. The enemy will turn red by subtracting 1 score while the friend turns green by adding 1 score. Player has a cannon at the bottom to shoot them.

    The mouse coordinates are displayed on one side.

    Now I want to detect the gaze point of the player on screen using a mobile or web camera and display it On the other side () and () eye gaze coordinates are visible. and at the end, I want to compare both values of mouse click and eye gaze coordinates if they are the same.

    All of this will be done in unity. Only detecting the Gaze part is left. I need help with detecting the player's pupil using the camera. Then I will use an algorithm to detect its gaze point on the screen. I am not sure if it can be done with the AR foundation, open cv, or anything else, as I am new to all of them.