public override void Recenter()
 {
     //
     for (int i = 0, imax = controllers.Length; i < imax; ++i)
     {
         controllers[i].OnVRContextRecenter();
     }
     //
     if ((ControllerInputManager.GetButtonDown(ControllerType.LeftController, (uint)XimmerseButton.Home) && ControllerInputManager.GetButton(ControllerType.RightController, (uint)XimmerseButton.Home)) ||
         (ControllerInputManager.GetButton(ControllerType.LeftController, (uint)XimmerseButton.Home) && ControllerInputManager.GetButtonDown(ControllerType.RightController, (uint)XimmerseButton.Home))
         )
     {
         XDevicePlugin.SendMessage(m_Handle, XDevicePlugin.kMessage_RecenterSensor, 1, 0);
         UpdateAnchorFromPlugin();
         //
         if (m_PlayAreaHelper != null)
         {
             m_PlayAreaHelper.OnTrackerRecenter();
         }
     }
 }
Example #2
0
 public override void Recenter()
 {
     //
     if (useAutoRecenter)
     {
         AlignHmd();
         return;
     }
     // Legacy method.
     RecenterAllControllers(0.0f);
     //
     if ((ControllerInputManager.GetButtonDown(ControllerType.LeftController, (uint)XimmerseButton.Home) && ControllerInputManager.GetButton(ControllerType.RightController, (uint)XimmerseButton.Home)) ||
         (ControllerInputManager.GetButton(ControllerType.LeftController, (uint)XimmerseButton.Home) && ControllerInputManager.GetButtonDown(ControllerType.RightController, (uint)XimmerseButton.Home))
         )
     {
         XDevicePlugin.SendMessage(m_Handle, XDevicePlugin.kMessage_RecenterSensor, 1, 0);
         UpdateAnchorFromPlugin();
         //
         if (m_PlayAreaHelper != null)
         {
             m_PlayAreaHelper.OnTrackerRecenter();
         }
     }
 }