// 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 void Start() { // Cache our prefab scripts. _eyeTracker = VREyeTracker.Instance; _gazeTrail = VRGazeTrail.Instance; _calibration = VRCalibration.Instance; _saveData = VRSaveData.Instance; _positioningGuide = VRPositioningGuide.Instance; // Move HUD to be in front of user. var etOrigin = VRUtility.EyeTrackerOriginVive; var holder = _threeDText.transform.parent; holder.parent = etOrigin; holder.localPosition = new Vector3(0, -1.35f, 3); holder.localRotation = Quaternion.Euler(25, 0, 0); }
void Update() { if (controller == null) { Debug.Log("Controller not initialized"); return; } triggerButtonDown = controller.GetPressDown(triggerButton | Valve.VR.EVRButtonId.k_EButton_DPad_Left); if (controller.GetPress(triggerButton)) { if (triggerWasUp) { triggerWasUp = false; controller.TriggerHapticPulse(2500, Valve.VR.EVRButtonId.k_EButton_Axis0); controller.TriggerHapticPulse(2500, Valve.VR.EVRButtonId.k_EButton_Axis1); Debug.Log("trigger button"); Vector3 Bstart = controllerModel.transform.position; // get the script on the other side VRCalibration vrc = calibrationController.GetComponent <VRCalibration>(); vrc.triggerPressed(Bstart); } } else { triggerWasUp = true; } // Debug.Log(controller.GetPress(triggerButton)); //Debug.Log(triggerButtonDown); if (triggerButtonDown) { } }
protected virtual void Start() { _eyeTracker = VREyeTracker.Instance; _calibration = VRCalibration.Instance; _center = new Vector2(0.5f, 0.5f); }