// 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; } }
// 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?"); } }
// 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; } }
// 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?"); } }
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)); }
// 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; } }
// Use this for initialization void Start() { smiInstance = SMIEyeTrackingUnity.Instance; output_ray = this.GetComponentInParent <OutputRay> (); }