Пример #1
0
    private static IEnumerator VibrationCoroutine(OVRInput.Controller controller, float duration, float frequency, float amplitude)
    {
        Debug.LogFormat("Haptics start: {0} - {1}s - freq {2} - timestamp {3}", controller.ToString(), duration, frequency, Time.time);
        OVRInput.SetControllerVibration(frequency, amplitude, controller);

        yield return(new WaitForSeconds(duration));

        Debug.LogFormat("Haptics stop: {0} - {1}s - freq {2} - timestamp {3}", controller.ToString(), duration, frequency, Time.time);
        OVRInput.SetControllerVibration(0f, 0f, controller);
    }
    public bool GetControllerTeleportActionDown(OVRInput.Controller controller)
    {
        //Debug.Log(controller.ToString());
        //Debug.Log(OVRInput.Controller.LTouch.ToString());
        bool value = false;// OVRInput.GetDown(OVRInput.Button.One, controller) | OVRInput.Get(OVRInput.Button.Three, controller);

        if (controller == OVRInput.Controller.LTouch)
        {
            value = OVRInput.GetDown(OVRInput.Button.Two, controller) | OVRInput.GetDown(OVRInput.Button.One, controller);
            #if UNITY_EDITOR
            if (m_DebugLogs && value)
            {
                Debug.Log("Teleport Action " + controller.ToString() + " " + value);
            }
            #endif
            //Debug.Log(controller.ToString()+" "+ value);

            /*
             * Debug.Log(controller.ToString() + " " + OVRInput.Button.PrimaryIndexTrigger.ToString() + " " + OVRInput.GetDown(OVRInput.Button.PrimaryIndexTrigger, controller));
             * Debug.Log(controller.ToString() + " " + OVRInput.Button.PrimaryHandTrigger.ToString() + " " + OVRInput.GetDown(OVRInput.Button.PrimaryHandTrigger, controller));
             * Debug.Log(controller.ToString() + " " + OVRInput.Button.One.ToString() + " " + OVRInput.GetDown(OVRInput.Button.One, controller));
             * Debug.Log(controller.ToString() + " " + OVRInput.Button.Two.ToString() + " " + OVRInput.GetDown(OVRInput.Button.Two, controller));
             * Debug.Log(controller.ToString() + " " + OVRInput.Button.Three.ToString() + " " + OVRInput.GetDown(OVRInput.Button.Three, controller));
             * Debug.Log(controller.ToString() + " " + OVRInput.Button.Four.ToString() + " " + OVRInput.GetDown(OVRInput.Button.Four, controller));
             * Debug.Log("_____");*/
        }
        else if (controller == OVRInput.Controller.RTouch)
        {
            value = OVRInput.GetDown(OVRInput.Button.Two, controller) | OVRInput.GetDown(OVRInput.Button.One, controller);
            #if UNITY_EDITOR
            if (m_DebugLogs && value)
            {
                Debug.Log("Teleport Action " + controller.ToString() + " " + value);
            }
            #endif
            //Debug.Log(controller.ToString() + " " + value);

            /*
             * Debug.Log(controller.ToString() + " " + OVRInput.Button.PrimaryIndexTrigger.ToString() + " " + OVRInput.GetDown(OVRInput.Button.PrimaryIndexTrigger, controller));
             * Debug.Log(controller.ToString() + " " + OVRInput.Button.PrimaryHandTrigger.ToString() + " " + OVRInput.GetDown(OVRInput.Button.PrimaryHandTrigger, controller));
             * Debug.Log(controller.ToString() + " " + OVRInput.Button.One.ToString() + " " + OVRInput.GetDown(OVRInput.Button.One, controller));
             * Debug.Log(controller.ToString() + " " + OVRInput.Button.Two.ToString() + " " + OVRInput.GetDown(OVRInput.Button.Two, controller));
             * Debug.Log(controller.ToString() + " " + OVRInput.Button.Three.ToString() + " " + OVRInput.GetDown(OVRInput.Button.Three, controller));
             * Debug.Log(controller.ToString() + " " + OVRInput.Button.Four.ToString() + " " + OVRInput.GetDown(OVRInput.Button.Four, controller));
             * Debug.Log("_____");*/
        }


        return(value);
    }
Пример #3
0
    private void LogButtons()
    {
        foreach (var button in Enum.GetValues(typeof(OVRInput.Button)))
        {
            if (OVRInput.GetDown((OVRInput.Button)button, controller))
            {
                Debug.Log(controller.ToString() + " button down: " + button.ToString());
            }

            if (OVRInput.GetUp((OVRInput.Button)button, controller))
            {
                Debug.Log(controller.ToString() + " button up: " + button.ToString());
            }
        }
    }
    public bool GetGrabGripDown(OVRInput.Controller hand)
    {
        bool val = OVRInput.GetDown(OVRInput.Button.PrimaryHandTrigger, hand);

        if (val)//val > m_floatToBoolThreshold)
        {
#if UNITY_EDITOR
            if (m_DebugLogs)
            {
                Debug.Log("GetGrabGripDown " + hand.ToString() + " " + val);
            }
#endif
            if (m_CalculateClickEvents)
            {
                if (!m_grabGripDownTime.ContainsKey(hand))
                {
                    m_grabGripDownTime.Add(hand, 0);
                }
                m_grabGripDownTime[hand] = Time.time;
            }
            return(true);
        }
        else
        {
            return(false);
        }
    }
    public bool GetGrabGripUp(OVRInput.Controller hand)
    {
        bool val = OVRInput.GetUp(OVRInput.Button.PrimaryHandTrigger, hand);

        if (val)//val > m_floatToBoolThreshold)
        {
#if UNITY_EDITOR
            if (m_DebugLogs)
            {
                Debug.Log("GetGrabGripUp " + hand.ToString() + " " + val);
            }
#endif
            if (m_CalculateClickEvents)
            {
                if (!m_grabGripDownTime.ContainsKey(hand))
                {
                    m_grabGripDownTime.Add(hand, 0);
                }
                if (Time.time - m_grabGripDownTime[hand] <= m_durationToRegisterClick)
                {
                    m_grabGripDownTime[hand] = 0.0f;
                    if (!m_grabGripClick.ContainsKey(hand))
                    {
                        m_grabGripClick.Add(hand, false);
                    }
                    m_grabGripClick[hand] = true;
                }
            }
            return(true);
        }
        else
        {
            return(false);
        }
    }
Пример #6
0
    // Update is called once per frame
    void Update()
    {
        transform.localPosition = OVRInput.GetLocalControllerPosition(controller);
        transform.localRotation = OVRInput.GetLocalControllerRotation(controller);

        if (controller == OVRInput.Controller.LTouch)
        {
            if (OVRInput.GetDown(OVRInput.Button.One, controller))
            {
                print(controller.ToString() + ": One");
                virtualHand.SetActive(true);
                rayCasterRender.GetComponent <LineRenderer>().enabled = false;
            }

            if (OVRInput.GetDown(OVRInput.Button.Two, controller))
            {
                virtualHand.SetActive(false);
                rayCasterRender.GetComponent <LineRenderer>().enabled = true;
                print(controller.ToString() + ": Two");
            }

            if (OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTrigger, controller) > 0)
            {
                //print(controller.ToString() + ": Trigger on");
            }

            if (OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTrigger, controller) <= 0)
            {
                //print(controller.ToString() + ": Trigger off");
            }

            if (OVRInput.Get(OVRInput.Axis1D.PrimaryHandTrigger, controller) > 0)
            {
                //print(controller.ToString() + ": Grip on");
                buttonsWindow.SetActive(true);
            }

            if (OVRInput.Get(OVRInput.Axis1D.PrimaryHandTrigger, controller) <= 0)
            {
                //print(controller.ToString() + ": Grip off");
                buttonsWindow.SetActive(false);
            }
        }
    }
Пример #7
0
    // Update is called once per frame
    void Update()
    {
        transform.localPosition = OVRInput.GetLocalControllerPosition(controller);
        transform.localRotation = OVRInput.GetLocalControllerRotation(controller);

        if (controller == OVRInput.Controller.RTouch)
        {
            if (OVRInput.GetDown(OVRInput.Button.One, controller))
            {
                print(controller.ToString() + ": One");
                rayCaster2.GetComponent <RayCaster2>().Launch();
            }

            if (OVRInput.GetDown(OVRInput.Button.Two, controller))
            {
                print(controller.ToString() + ": Two");
                virtualHand.GetComponent <VirtualHand>().Launch();
            }

            if (OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTrigger, controller) > 0)
            {
            }

            if (OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTrigger, controller) <= 0)
            {
                //print(controller.ToString() + ": Trigger off");
            }

            if (OVRInput.Get(OVRInput.Axis1D.PrimaryHandTrigger, controller) > 0)
            {
                rayCaster2.GetComponent <RayCaster2>().GroupingOnOff(true);
                //print(controller.ToString() + ": Grip on");
            }

            if (OVRInput.Get(OVRInput.Axis1D.PrimaryHandTrigger, controller) <= 0)
            {
                rayCaster2.GetComponent <RayCaster2>().GroupingOnOff(false);
                //print(controller.ToString() + ": Grip off");
            }
        }
    }
    private void CreateControllers()
    {
        Assert.IsNull(_trackedController, "Controller expected to be null");
        string name = _vrControllerPrefab.name + " [" + _type.ToString() + "]";

        _trackedController      = Instantiate <VRController>(_vrControllerPrefab);
        _trackedController.name = name;
        _trackedController.transform.SetParent(transform);
        _trackedController.transform.localPosition = Vector3.zero;
        _trackedController.transform.localScale    = Vector3.one;
        _trackedController.AssignController(_type, transform);
    }
    public bool GetGrabGrip(OVRInput.Controller hand)
    {
        bool val = OVRInput.Get(OVRInput.Button.PrimaryHandTrigger, hand);

        if (val)//val > m_floatToBoolThreshold)
        {
#if UNITY_EDITOR
            if (m_DebugLogs)
            {
                Debug.Log("GetGrabGrip " + hand.ToString() + " " + val);
            }
#endif
            return(true);
        }
        else
        {
            return(false);
        }
    }
    public bool GetGrabGripClick(OVRInput.Controller hand)
    {
        if (m_CalculateClickEvents)
        {
            if (!m_grabGripClick.ContainsKey(hand))
            {
                m_grabGripClick.Add(hand, false);
            }
            #if UNITY_EDITOR
            if (m_DebugLogs && m_grabGripClick[hand])
            {
                Debug.Log("GetGrabGripCLICK " + hand.ToString() + " " + m_grabGripClick[hand]);
            }
            #endif


            if (m_grabGripClick[hand])
            {
                if (m_lastInputFalseFrame >= m_lastInputTrueFrame)
                {
                    m_lastInputTrueFrame = Time.frameCount;
                    Debug.Log("GetGrabAnyClicked_____input");
                    return(m_grabGripClick[hand]);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                m_lastInputFalseFrame = Time.frameCount;
                return(m_grabGripClick[hand]);
            }
        }
        else
        {
            return(false);
        }
    }
Пример #11
0
    void Update()
    {
        OVRInput.Controller activeController = OVRInput.GetActiveController();

        data.Length = 0;

        float framerate = OVRPlugin.GetAppFramerate();

        data.AppendFormat("Framerate: {0:F2}\n", framerate);

        string activeControllerName = activeController.ToString();

        data.AppendFormat("Active: {0}\n", activeControllerName);

        string connectedControllerNames = OVRInput.GetConnectedControllers().ToString();

        data.AppendFormat("Connected: {0}\n", connectedControllerNames);

        Quaternion rot = OVRInput.GetLocalControllerRotation(activeController);

        data.AppendFormat("Orientation: ({0:F2}, {1:F2}, {2:F2}, {3:F2})\n", rot.x, rot.y, rot.z, rot.w);

        Vector3 angVel = OVRInput.GetLocalControllerAngularVelocity(activeController);

        data.AppendFormat("AngVel: ({0:F2}, {1:F2}, {2:F2})\n", angVel.x, angVel.y, angVel.z);

        Vector3 angAcc = OVRInput.GetLocalControllerAngularAcceleration(activeController);

        data.AppendFormat("AngAcc: ({0:F2}, {1:F2}, {2:F2})\n", angAcc.x, angAcc.y, angAcc.z);

        Vector3 pos = OVRInput.GetLocalControllerPosition(activeController);

        data.AppendFormat("Position: ({0:F2}, {1:F2}, {2:F2})\n", pos.x, pos.y, pos.z);

        Vector3 vel = OVRInput.GetLocalControllerVelocity(activeController);

        data.AppendFormat("Vel: ({0:F2}, {1:F2}, {2:F2})\n", vel.x, vel.y, vel.z);

        Vector3 acc = OVRInput.GetLocalControllerAcceleration(activeController);

        data.AppendFormat("Acc: ({0:F2}, {1:F2}, {2:F2})\n", acc.x, acc.y, acc.z);

        Vector2 primaryTouchpad = OVRInput.Get(OVRInput.Axis2D.PrimaryTouchpad);

        data.AppendFormat("PrimaryTouchpad: ({0:F2}, {1:F2})\n", primaryTouchpad.x, primaryTouchpad.y);

        Vector2 secondaryTouchpad = OVRInput.Get(OVRInput.Axis2D.SecondaryTouchpad);

        data.AppendFormat("SecondaryTouchpad: ({0:F2}, {1:F2})\n", secondaryTouchpad.x, secondaryTouchpad.y);

        for (int i = 0; i < monitors.Count; i++)
        {
            monitors[i].Update();
            monitors[i].AppendToStringBuilder(ref data);
        }

        if (uiText != null)
        {
            uiText.text = data.ToString();
        }
    }
Пример #12
0
    void Update()
    {
        OVRInput.Controller activeController = OVRInput.GetActiveController();

        data.Length = 0;
        byte recenterCount = OVRInput.GetControllerRecenterCount();

        data.AppendFormat("RecenterCount: {0}\n", recenterCount);

        byte battery = OVRInput.GetControllerBatteryPercentRemaining();

        data.AppendFormat("Battery: {0}\n", battery);

        float framerate = OVRPlugin.GetAppFramerate();

        data.AppendFormat("Framerate: {0:F2}\n", framerate);

        string activeControllerName = activeController.ToString();

        data.AppendFormat("Active: {0}\n", activeControllerName);

        string connectedControllerNames = OVRInput.GetConnectedControllers().ToString();

        data.AppendFormat("Connected: {0}\n", connectedControllerNames);

        data.AppendFormat("PrevConnected: {0}\n", prevConnected);

        controllers.Update();
        controllers.AppendToStringBuilder(ref data);

        prevConnected = connectedControllerNames;

        Vector3 rot = OVRInput.GetLocalControllerRotation(activeController).eulerAngles;

        if (rot.x > 180f)
        {
            rot.x -= 360f;
        }
        if (rot.y > 180f)
        {
            rot.y -= 360f;
        }
        if (rot.z > 180f)
        {
            rot.z -= 360f;
        }

        data.AppendFormat("Orientation: ({0:F2}, {1:F2}, {2:F2})\n", rot.x, rot.y, rot.z);
        //Quaternion rot = OVRInput.GetLocalControllerRotation(activeController);
        //data.AppendFormat("Orientation: ({0:F2}, {1:F2}, {2:F2})\n", rot.x, rot.y, rot.z, rot.w);

        Vector3 angVel = OVRInput.GetLocalControllerAngularVelocity(activeController);

        data.AppendFormat("AngVel: ({0:F2}, {1:F2}, {2:F2})\n", angVel.x, angVel.y, angVel.z);

        Vector3 angAcc = OVRInput.GetLocalControllerAngularAcceleration(activeController);

        data.AppendFormat("AngAcc: ({0:F2}, {1:F2}, {2:F2})\n", angAcc.x, angAcc.y, angAcc.z);

        Vector3 pos = OVRInput.GetLocalControllerPosition(activeController);

        data.AppendFormat("Position: ({0:F2}, {1:F2}, {2:F2})\n", pos.x, pos.y, pos.z);

        Vector3 vel = OVRInput.GetLocalControllerVelocity(activeController);

        data.AppendFormat("Vel: ({0:F2}, {1:F2}, {2:F2})\n", vel.x, vel.y, vel.z);

        Vector3 acc = OVRInput.GetLocalControllerAcceleration(activeController);

        data.AppendFormat("Acc: ({0:F2}, {1:F2}, {2:F2})\n", acc.x, acc.y, acc.z);

        Vector2 primaryTouchpad = OVRInput.Get(OVRInput.Axis2D.PrimaryTouchpad);

        data.AppendFormat("PrimaryTouchpad: ({0:F2}, {1:F2})\n", primaryTouchpad.x, primaryTouchpad.y);

        Vector2 secondaryTouchpad = OVRInput.Get(OVRInput.Axis2D.SecondaryTouchpad);

        data.AppendFormat("SecondaryTouchpad: ({0:F2}, {1:F2})\n", secondaryTouchpad.x, secondaryTouchpad.y);

        float indexTrigger = OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTrigger);

        data.AppendFormat("PrimaryIndexTriggerAxis1D: ({0:F2})\n", indexTrigger);

        float handTrigger = OVRInput.Get(OVRInput.Axis1D.PrimaryHandTrigger);

        data.AppendFormat("PrimaryHandTriggerAxis1D: ({0:F2})\n", handTrigger);

        for (int i = 0; i < monitors.Count; i++)
        {
            monitors[i].Update();
            monitors[i].AppendToStringBuilder(ref data);
        }

        if (uiText != null)
        {
            uiText.text = data.ToString();
        }
    }
Пример #13
0
    void Update()
    {
        data.Length = 0;

        OVRInput.Controller activeController = OVRInput.GetActiveController();

        string activeControllerName = activeController.ToString();

        data.AppendFormat("Active: {0}\n", activeControllerName);

        string connectedControllerNames = OVRInput.GetConnectedControllers().ToString();

        data.AppendFormat("Connected: {0}\n", connectedControllerNames);

        data.AppendFormat("PrevConnected: {0}\n", prevConnected);

        controllers.Update();
        controllers.AppendToStringBuilder(ref data);
        prevConnected = connectedControllerNames;

        Vector3 pos = OVRInput.GetLocalControllerPosition(activeController);

        data.AppendFormat("Position: ({0:F2}, {1:F2}, {2:F2})\n", pos.x, pos.y, pos.z);

        Quaternion rot = OVRInput.GetLocalControllerRotation(activeController);

        data.AppendFormat("Orientation: ({0:F2}, {1:F2}, {2:F2}, {3:F2})\n", rot.x, rot.y, rot.z, rot.w);

        data.AppendFormat("HandTrackingEnabled: {0}\n", OVRPlugin.GetHandTrackingEnabled());

        bool result_hs_LH = OVRPlugin.GetHandState(OVRPlugin.Step.Render, OVRPlugin.Hand.HandLeft, ref hs_LH);

        data.AppendFormat("LH HS Query Res: {0}\n", result_hs_LH);
        data.AppendFormat("LH HS Status: {0}\n", hs_LH.Status);
        data.AppendFormat("LH HS Pose: {0}\n", hs_LH.RootPose);
        data.AppendFormat("LH HS HandConf: {0}\n", hs_LH.HandConfidence);

        bool result_hs_RH = OVRPlugin.GetHandState(OVRPlugin.Step.Render, OVRPlugin.Hand.HandRight, ref hs_RH);

        data.AppendFormat("RH HS Query Res: {0}\n", result_hs_RH);
        data.AppendFormat("RH HS Status: {0}\n", hs_RH.Status);
        data.AppendFormat("RH HS Pose: {0}\n", hs_RH.RootPose);
        data.AppendFormat("RH HS HandConf: {0}\n", hs_RH.HandConfidence);

        data.AppendFormat("LH Skel Query Res: {0}\n", result_skel_LH);
        data.AppendFormat("LH Skel Type: {0}\n", skel_LH.Type);
        data.AppendFormat("LH Skel NumBones: {0}\n", skel_LH.NumBones);

        data.AppendFormat("RH Skel Query Res: {0}\n", result_skel_RH);
        data.AppendFormat("RH Skel Type: {0}\n", skel_RH.Type);
        data.AppendFormat("RH Skel NumBones: {0}\n", skel_RH.NumBones);

        data.AppendFormat("LH Mesh Query Res: {0}\n", result_mesh_LH);
        data.AppendFormat("LH Mesh Type: {0}\n", mesh_LH.Type);
        data.AppendFormat("LH Mesh NumVers: {0}\n", mesh_LH.NumVertices);

        data.AppendFormat("RH Mesh Query Res: {0}\n", result_mesh_RH);
        data.AppendFormat("RH Mesh Type: {0}\n", mesh_RH.Type);
        data.AppendFormat("RH Mesh NumVers: {0}\n", mesh_RH.NumVertices);

        for (int i = 0; i < monitors.Count; i++)
        {
            monitors[i].Update();
            monitors[i].AppendToStringBuilder(ref data);
        }

        if (uiText != null)
        {
            uiText.text = data.ToString();
        }
    }
Пример #14
0
        void OnEnable()
        {
            m_currentInputs = GetComponent <Inputs>();
            //TODO : add fove camera
            //set the current camera
            if (m_foveActive)
            {
                m_currentCamera = m_foveCam;
                m_VRCam.transform.parent.gameObject.SetActive(false);
                m_mouseCam.transform.parent.gameObject.SetActive(false);
            }

            else if (VRSettings.enabled)
            {
                m_currentCamera = m_VRCam;
                m_mouseCam.transform.parent.gameObject.SetActive(false);
                m_foveCam.transform.parent.gameObject.SetActive(false);
            }
            else
            {
                m_currentCamera = m_mouseCam;
                m_VRCam.transform.parent.gameObject.SetActive(false);
                m_foveCam.transform.parent.gameObject.SetActive(false);
            }

            m_currentCamera.transform.parent.gameObject.SetActive(true);
            Debug.Log("Selected Camera = " + m_currentCamera.name);

            //test in awake

            if (m_menu)
            {
                return;
            }

            //set the current input
            OVRInput.Update();
            OVRInput.Controller controller = OVRInput.GetConnectedControllers();
            Debug.Log("Controller selected = " + controller);

            m_currentInputName = controller.ToString();
            if (m_currentInputName == "None")
            {
                m_currentInputName = "Mouse";
            }
            if (controller == OVRInput.Controller.Touch)
            {
                for (int i = 0; i < m_TwoArmsWeapon.Length; i++)
                {
                    m_TwoArmsWeapon[i].SetActive(true);
                }
                m_OneArmWeapon.SetActive(false);

                m_currentCamera.GetComponent <Raycaster>().enabled       = false;
                m_currentCamera.GetComponent <Reticle>().enabled         = false;
                m_currentCamera.GetComponent <SelectionRadial>().enabled = false;
            }

            else
            {
                for (int i = 0; i < m_TwoArmsWeapon.Length; i++)
                {
                    m_TwoArmsWeapon[i].SetActive(false);
                }
                m_OneArmWeapon.SetActive(true);
            }
        }
Пример #15
0
    private void Update()
    {
        OVRInput.Controller activeController = OVRInput.GetActiveController();
        this.data.Length = 0;
        byte controllerRecenterCount = OVRInput.GetControllerRecenterCount(OVRInput.Controller.Active);

        this.data.AppendFormat("RecenterCount: {0}\n", controllerRecenterCount);
        byte controllerBatteryPercentRemaining = OVRInput.GetControllerBatteryPercentRemaining(OVRInput.Controller.Active);

        this.data.AppendFormat("Battery: {0}\n", controllerBatteryPercentRemaining);
        float appFramerate = OVRPlugin.GetAppFramerate();

        this.data.AppendFormat("Framerate: {0:F2}\n", appFramerate);
        string arg = activeController.ToString();

        this.data.AppendFormat("Active: {0}\n", arg);
        string arg2 = OVRInput.GetConnectedControllers().ToString();

        this.data.AppendFormat("Connected: {0}\n", arg2);
        this.data.AppendFormat("PrevConnected: {0}\n", OVRGearVrControllerTest.prevConnected);
        OVRGearVrControllerTest.controllers.Update();
        OVRGearVrControllerTest.controllers.AppendToStringBuilder(ref this.data);
        OVRGearVrControllerTest.prevConnected = arg2;
        Quaternion localControllerRotation = OVRInput.GetLocalControllerRotation(activeController);

        this.data.AppendFormat("Orientation: ({0:F2}, {1:F2}, {2:F2}, {3:F2})\n", new object[]
        {
            localControllerRotation.x,
            localControllerRotation.y,
            localControllerRotation.z,
            localControllerRotation.w
        });
        Vector3 localControllerAngularVelocity = OVRInput.GetLocalControllerAngularVelocity(activeController);

        this.data.AppendFormat("AngVel: ({0:F2}, {1:F2}, {2:F2})\n", localControllerAngularVelocity.x, localControllerAngularVelocity.y, localControllerAngularVelocity.z);
        Vector3 localControllerAngularAcceleration = OVRInput.GetLocalControllerAngularAcceleration(activeController);

        this.data.AppendFormat("AngAcc: ({0:F2}, {1:F2}, {2:F2})\n", localControllerAngularAcceleration.x, localControllerAngularAcceleration.y, localControllerAngularAcceleration.z);
        Vector3 localControllerPosition = OVRInput.GetLocalControllerPosition(activeController);

        this.data.AppendFormat("Position: ({0:F2}, {1:F2}, {2:F2})\n", localControllerPosition.x, localControllerPosition.y, localControllerPosition.z);
        Vector3 localControllerVelocity = OVRInput.GetLocalControllerVelocity(activeController);

        this.data.AppendFormat("Vel: ({0:F2}, {1:F2}, {2:F2})\n", localControllerVelocity.x, localControllerVelocity.y, localControllerVelocity.z);
        Vector3 localControllerAcceleration = OVRInput.GetLocalControllerAcceleration(activeController);

        this.data.AppendFormat("Acc: ({0:F2}, {1:F2}, {2:F2})\n", localControllerAcceleration.x, localControllerAcceleration.y, localControllerAcceleration.z);
        Vector2 vector = OVRInput.Get(OVRInput.Axis2D.PrimaryTouchpad, OVRInput.Controller.Active);

        this.data.AppendFormat("PrimaryTouchpad: ({0:F2}, {1:F2})\n", vector.x, vector.y);
        Vector2 vector2 = OVRInput.Get(OVRInput.Axis2D.SecondaryTouchpad, OVRInput.Controller.Active);

        this.data.AppendFormat("SecondaryTouchpad: ({0:F2}, {1:F2})\n", vector2.x, vector2.y);
        float num = OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTrigger, OVRInput.Controller.Active);

        this.data.AppendFormat("PrimaryIndexTriggerAxis1D: ({0:F2})\n", num);
        float num2 = OVRInput.Get(OVRInput.Axis1D.PrimaryHandTrigger, OVRInput.Controller.Active);

        this.data.AppendFormat("PrimaryHandTriggerAxis1D: ({0:F2})\n", num2);
        for (int i = 0; i < this.monitors.Count; i++)
        {
            this.monitors[i].Update();
            this.monitors[i].AppendToStringBuilder(ref this.data);
        }
        if (this.uiText != null)
        {
            this.uiText.text = this.data.ToString();
        }
    }