private void GetActionData()
        {
            if (_lastFrame != Time.frameCount)
            {
                _actionData = OpenVrWrapper.GetPoseActionDataForNextFrame(handle);
                HmdMatrix34_t rawMatrix = _actionData.pose.mDeviceToAbsoluteTracking;
                _pose = new Pose(GetPosition(rawMatrix), GetRotation(rawMatrix));
            }

            _lastFrame = Time.frameCount;
        }
Exemple #2
0
 /// <summary>
 /// Triggers a haptic vibration action.
 /// </summary>
 /// <param name="durationSeconds">How long to trigger the haptic event for.</param>
 /// <param name="magnitude">The magnitude of the haptic event. This value must be between 0.0 and 1.0.</param>
 /// <param name="frequency">The frequency in cycles per second of the haptic event.</param>
 public void TriggerHapticVibration(float durationSeconds, float magnitude, float frequency = 150f)
 {
     OpenVrWrapper.TriggerHapticVibrationAction(handle, 0, durationSeconds, frequency, magnitude);
 }
Exemple #3
0
 internal void UpdateHandle()
 {
     handle = OpenVrWrapper.GetActionHandle(name);
 }