void OnIndexTriggerHolding(Oculus_ControllerArgs e)
 {
     if (indexTriggerHolding != null)
     {
         indexTriggerHolding(this, e);
     }
 }
 void OnIndexTriggerUnpressed(Oculus_ControllerArgs e)
 {
     if (indexTriggerUnpressed != null)
     {
         indexTriggerUnpressed(this, e);
     }
 }
 void OnIndexTriggerPress(Oculus_ControllerArgs e)
 {
     if (indexTriggerPress != null)
     {
         indexTriggerPress(this, e);
     }
 }
 void OnThumbUntouched(Oculus_ControllerArgs e)
 {
     if (thumbUntouched != null)
     {
         thumbUntouched(this, e);
     }
 }
 void OnThumbPressed(Oculus_ControllerArgs e)
 {
     if (thumbPressed != null)
     {
         thumbPressed(this, e);
     }
 }
 void OnHandTriggerPressed(Oculus_ControllerArgs e)
 {
     if (handTriggerPressed != null)
     {
         handTriggerPressed(this, e);
     }
 }
 void OnHandTriggerUnpressing(Oculus_ControllerArgs e)
 {
     if (handTriggerUnpressing != null)
     {
         handTriggerUnpressing(this, e);
     }
 }
Example #8
0
 void EndErasing(object sender, Oculus_ControllerArgs e)
 {
     if (e.axis_1d < 0.5f)
     {
         marker.stopFreeErasing();
     }
 }
 void OnButton2Pressed(Oculus_ControllerArgs e)
 {
     if (button2Pressed != null)
     {
         button2Pressed(this, e);
     }
 }
 void OnMenubuttonPressed(Oculus_ControllerArgs e)
 {
     if (menubuttonPressed != null)
     {
         menubuttonPressed(this, e);
     }
 }
 void OnJoystickPush(Oculus_ControllerArgs e)
 {
     if (joystickPush != null)
     {
         joystickPush(this, e);
     }
 }
Example #12
0
 void EnableDrawMode(object sender, Oculus_ControllerArgs e)
 {
     if (!draw.enabled)
     {
         draw.enabled = true;
         grab.enabled = false;
     }
 }
Example #13
0
 void EnableGrabMode(object sender, Oculus_ControllerArgs e)
 {
     if (!grab.enabled)
     {
         grab.enabled = true;
         draw.enabled = false;
     }
 }
Example #14
0
    void Recenter(object sender, Oculus_ControllerArgs e)
    {
        Transform oculus_transform = transform.parent.parent.parent.parent;

        if (oculus_transform.gameObject.name == "Oculus")
        {
            Quaternion eyeRot = transform.parent.parent.Find("CenterEyeAnchor").rotation;
            eyeRot.x = 0f;
            eyeRot.z = 0f;
            oculus_transform.rotation *= Quaternion.Inverse(eyeRot);

            Vector3 eyePos = transform.parent.parent.Find("CenterEyeAnchor").position;
            oculus_transform.position -= eyePos;
            oculus_transform.position  = new Vector3(oculus_transform.position.x, 10f, oculus_transform.position.z);

            GameOptions.initialCameraPos = oculus_transform.position;
            GameOptions.initialCameraRot = oculus_transform.rotation;
            Debug.Log("initialPos = " + GameOptions.initialCameraPos);
        }
    }
Example #15
0
 void StartErasing(object sender, Oculus_ControllerArgs e)
 {
     marker.startFreeErasing();
 }
Example #16
0
 void StartDrawing(object sender, Oculus_ControllerArgs e)
 {
     marker.startFreeDrawing();
 }
Example #17
0
 void NextScene(object sender, Oculus_ControllerArgs e)
 {
     UnityEngine.SceneManagement.SceneManager.LoadScene(1);
 }