如何在我的应用程序中使用陀螺仪? [英] how use gyroscope in my app?

查看:301
本文介绍了如何在我的应用程序中使用陀螺仪?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的应用程序中实现陀螺仪,但是用于Windows Phone的可视工作室"却没有实现.向我发送一条消息,告诉我该平台中不存在传感器",我尝试

I want implement the gyroscope in my application but the "visual studio for windows phone" launch me a message telling me that the "sensor is not present in this platform" I try this

if (Gyroscope.IsSupported)
            {
                gyroscope = new Gyroscope();
                //gyroscope.CurrentValue.RotationRate;
                gyroscope.TimeBetweenUpdates = TimeSpan.FromMilliseconds(20);
                gyroscope.CurrentValueChanged += new EventHandler<SensorReadingEventArgs<GyroscopeReading>>(gyroscope_CurrentValueChanged);
                
            }


但在Silverlight和XNA应用程序中仍然无法使用

but still without works in a silverlight and XNA app

推荐答案

很少有设备内置陀螺仪.  只有在Mango之后发布的某些手机才能使用它们.
Very few devices have a gyroscope built-in.  Only some phones released after Mango have them.


这篇关于如何在我的应用程序中使用陀螺仪?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆