开发者

C# wiimote library - computing distance from sensor bar to 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 ef开发者_C百科fect 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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜