Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Hank_Li

  1. Hi @hollandera Please refer to this unity code And you can get nose tracking you want in unity. int dart_board_layer_id = LayerMask.NameToLayer("NoReflection"); Vector3 direction = Vector3.forward; Vector3 origin = Vector3.zero; Ray rayGlobal = new Ray(Camera.main.transform.position, Camera.main.transform.TransformDirection(direction)); RaycastHit hit; Physics.Raycast(rayGlobal, out hit, 20, (1 << dart_board_layer_id)); You can download the unity sample here: https://developer.vive.com/resources/knowledgebase/vive-sranipal-sdk/ Thank you.
  2. Hi @hollandera Do you want to use the SRanipal function in unity code on Vive pro(no eye tracking machine)? Thanks.
  3. Hi Nikki: If you want to initial Eye V2 engine: 1. Please do not modify any header file we provide. E.g. in SRanipal_Eye.h, the following line should be: const int ANIPAL_TYPE_EYE_V2 = 2; 2. You need a separate flag to check if eye v2 is enabled, e.g., int error = ViveSR::anipal::Initial(ViveSR::anipal::Eye::ANIPAL_TYPE_EYE_V2, NULL); if (error == ViveSR::Error::WORK) { EnableEyeV2 = true; } Then in the function void streaming(), you need separate code to handle eye v2 data, e.g., if (EnableEyeV2) { int result = ViveSR::anipal::Eye::GetEyeData_v2(&eye_data_v2); if (result == ViveSR::Error::WORK) { float *gaze = eye_data_v2.verbose_data.left.gaze_direction_normalized.elem_; printf("[Eye v2] Wide: %.2f %.2f \n", eye_data_v2.expression_data.left.eye_wide, eye_data_v2.expression_data.right.eye_wide); } }
  • Create New...