//数据手套初始化,硬件连接 public void OnConnectGlove() { if (IsVREnabled && LH_tracker == null && RH_tracker == null) { return; } try { LH_Mode = LH.Init(HANDTYPE.LEFT_HAND); if (LH_Mode) { print("Left hand glove connected!"); LH.RegisterCallBack(); LH.StartStreaming(); } RH_Mode = RH.Init(HANDTYPE.RIGHT_HAND); if (RH_Mode) { print("Right hand glove connected!"); RH.RegisterCallBack(); RH.StartStreaming(); } } catch (Exception e) { print("Exception caught: " + e); } }
//数据手套初始化,硬件连接 //! Connect data glove and initialization. public void OnConnectGlove() { if (IsVREnabled && LH_tracker == null && RH_tracker == null) { return; } try { LH_Mode = LH.Init(HANDTYPE.LEFT_HAND); if (LH_Mode) { print("Left hand glove connected!"); LH.SetThumbOffset(thumb_offset_L[0], VRTRIXBones.L_Thumb_1); LH.SetThumbOffset(thumb_offset_L[1], VRTRIXBones.L_Thumb_2); LH.SetThumbOffset(thumb_offset_L[2], VRTRIXBones.L_Thumb_3); LH.SetThumbSlerpRate(thumb_proximal_slerp, thumb_middle_slerp); LH.RegisterCallBack(); LH.StartStreaming(); } RH_Mode = RH.Init(HANDTYPE.RIGHT_HAND); if (RH_Mode) { print("Right hand glove connected!"); RH.SetThumbOffset(thumb_offset_R[0], VRTRIXBones.R_Thumb_1); RH.SetThumbOffset(thumb_offset_R[1], VRTRIXBones.R_Thumb_2); RH.SetThumbOffset(thumb_offset_R[2], VRTRIXBones.R_Thumb_3); RH.SetThumbSlerpRate(thumb_proximal_slerp, thumb_middle_slerp); RH.RegisterCallBack(); RH.StartStreaming(); } } catch (Exception e) { print("Exception caught: " + e); } }