/// <summary>
            /// Orientation wrapper callback, interfacing Managed-OSVR's signatures and more Unity-native datatypes, including coordinate system conversion.
            /// </summary>
            /// <param name="userdata">Unused</param>
            /// <param name="timestamp">Unused</param>
            /// <param name="report">Tracker orientation report</param>
            private void OrientationCb(System.IntPtr userdata, ref OSVR.ClientKit.TimeValue timestamp, ref OSVR.ClientKit.OrientationReport report)
            {
                Quaternion rotation = Math.ConvertOrientation(report.rotation);

                if (null != orientationCallbacks)
                {
                    orientationCallbacks(path, rotation);
                }
            }
예제 #2
0
 private void callback(IntPtr userdata, ref OSVR.ClientKit.TimeValue timestamp, ref OSVR.ClientKit.OrientationReport report)
 {
     transform.localRotation = Math.ConvertOrientation(report.rotation);
 }