简体   繁体   English

如何将手机的陀螺仪和加速度计传感器值转换为人体运动

[英]How to convert Phone's GyroScope and Accelerometer Sensor values to Human Motion

I want to create an app in unity in which I can swing my phone like a bat and it tells me in which direction of the clock I play a shot.我想创建一个统一的应用程序,在其中我可以像蝙蝠一样摆动我的手机,它会告诉我我在时钟的哪个方向打球。 Like when I Swing phone towards 6'o clock ...it should tell me 6 when swing phone towards 9'o clock ...it should tell me 9...etc就像当我将手机朝 6 点钟方向摆动时……它应该告诉我 6 当朝 9 点钟方向摆动手机时……它应该告诉我 9 点……等等

This is not possible because phone does not know (and cannot know) its relative position to the user.这是不可能的,因为手机不知道(也不能知道)它与用户的相对位置。

You can detect horizontal or vertical gestures easily but guessing the direction from/to user is the problem.您可以轻松检测水平或垂直手势,但猜测来自/到用户的方向是问题所在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM