C# Wiimote 库 - 计算从传感器条到 Wiimote 的距离
我正在使用 C# 管理的 Wiimote 库来完成一个有趣的项目,但我很难找到一个很好的教程来说明如何计算 Wiimote 距显示器(即传感器条)的距离。我想创建一个缩放效果,其中对象会根据您将 Wiimote 从屏幕向后移动的距离而放大或缩小。
谁能帮我解决这个问题吗?
I'm working with the C# managed wiimote library for a little fun project I'm working on, But I'm having trouble finding a good tutorial on how to calculate how far the wiimote is from the monitor (i.e sensor bar). I want to create a zoom effect where an object will grow or shrink based on how far back you move the wiimote from the screen.
Can anyone help me with this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该系统尚未校准,因此无法告诉您实际距离。但是它可以告诉您相对距离。遥控器上的红外传感器的工作原理是告诉您传感器条上红外光源的大小和位置。当遥控器移得更远时,灯光会变得更小且靠得更近;当遥控器靠近时,灯光会变大,彼此之间的距离也会变远。我会使用灯光之间的距离,因为点的大小仅在 0 到 15 之间。
我推荐 Brian Peek 的 Wii 库:http://wiimotelib.codeplex.com
The system is not calibrated, so it isn't able to tell you the actual distance. However it can tell you the relative distance. The IR sensor on the remote works by telling you the size and location of up the IR light sources on the sensor bar. When the remote moves farther away, the lights get smaller and closer together; when the remote gets closer, the lights get larger and farther away from each other. I would use the distance between the lights, as the size of the dots only goes from 0-15.
I recommend Brian Peek's Wii library: http://wiimotelib.codeplex.com