Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        Ray ray = new Ray(hmd.transform.position, hmd.transform.forward);

        OutputRay output_ray = this.GetComponentInParent <OutputRay> ();

        if (output_ray != null)
        {
            output_ray._ray_raw = ray;
        }
    }
Exemplo n.º 2
0
    // Script initialization
    void Start()
    {
        output_ray = this.GetComponentInParent <OutputRay> ();


        // Get EyeTracker unity object
        _eyeTracker = PupilGazeTracker.Instance;
        if (HasEyeTracker)
        {
            Debug.Log("Failed to find pupil eye tracker, has it been added to scene?");
        }
    }
Exemplo n.º 3
0
    // Update is called once per frame
    void Update()
    {
//		Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

        Ray ray = cam.ScreenPointToRay(Input.mousePosition);

        OutputRay output_ray = this.GetComponentInParent <OutputRay> ();

        if (output_ray != null)
        {
            //print ("---mouse gaze ray---" + ray);
            output_ray._ray = ray;
        }
    }
Exemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        output_ray = this.GetComponentInParent <OutputRay> ();

        // Get EyeTracker unity object
        _eyeTracker        = VREyeTracker.Instance;
        _calibrationObject = VRCalibration.Instance;



        if (HasEyeTracker)
        {
            Debug.Log("Failed to find tobii eye tracker, has it been added to scene?");
        }
    }
Exemplo n.º 5
0
    private Ray GetRay()
    {
        OutputRay _outputRay = this.transform.GetComponentInParent <OutputRay> ();

        if (_ray_To_Show == Ray_To_Show.Raw)
        {
            return(_outputRay._ray_raw);
        }
        if (_ray_To_Show == Ray_To_Show._ray_smooth_all)
        {
            return(_outputRay._ray_smooth_all);
        }
        if (_ray_To_Show == Ray_To_Show._ray_smooth_fixations)
        {
            return(_outputRay._ray_smooth_fixations);
        }


        return(default(Ray));
    }
Exemplo n.º 6
0
    // Update is called once per frame
    void Update()
    {
        GameObject lasertip = GameObject.Find("[" + this.name + "]WorldPointer_SimplePointer_PointerTip");

        Ray pointerRay = default(Ray);

        if (lasertip != null)
        {
            var controllerPos = this;


            pointerRay = new Ray(controllerPos.transform.position, lasertip.transform.position - controllerPos.transform.position);
        }
        OutputRay output_ray = this.GetComponentInParent <OutputRay> ();

        if (output_ray != null)
        {
            output_ray._ray = pointerRay;
        }
    }
Exemplo n.º 7
0
 // Use this for initialization
 void Start()
 {
     smiInstance = SMIEyeTrackingUnity.Instance;
     output_ray  = this.GetComponentInParent <OutputRay> ();
 }