private void OrpheShoe_ValueChanged(object sender, OrpheValueChangedEventArgs e)
        {
            //SS  Debug.Log("OrpheShoe_ValueChanged" + sender.ToString());

            Task.Run(async() =>
            {
                UnityEngine.WSA.Application.InvokeOnAppThread(() =>
                {
                    OnValueChanged(e);
                }, true);
            });
        }
Exemplo n.º 2
0
        private void ValueChanged(OrpheValueChangedEventArgs e)
        {
            //  model.localRotation = OrpheDeviceManager.Instance.deviceQ;
            model.localRotation     = new Quaternion((float)e.Quaternion.x, (float)e.Quaternion.y, (float)e.Quaternion.z, (float)e.Quaternion.w);
            model.localEulerAngles += new Vector3(-90, 0, 0);
            //  logmsg.text = model.localRotation.ToString();

            float speed = 5;

            axis[AxisBar.AxisType.X].val = 5 + (float)e.Acceleration.x * speed;
            axis[AxisBar.AxisType.Y].val = 5 + (float)e.Acceleration.y * speed;
            axis[AxisBar.AxisType.Z].val = 5 + (float)e.Acceleration.z * speed;

            logmsg.text  = "Shock:" + e.Shock;
            logmsg.text += "\r\nGestureDirection:" + e.GestureDirection.ToString();
            logmsg.text += "\r\nGestureName:" + e.GestureName.ToString();
        }
Exemplo n.º 3
0
        private void OrpheShoe_ValueChanged(object sender, OrpheValueChangedEventArgs e)
        {
            var now = DateTime.Now;

            Debug.WriteLine("{0:HHmmssfff} {1:f3} {2:f3} {3:f3}", now, e.Acceleration.x, e.Acceleration.y, e.Acceleration.z);
        }