views:

58

answers:

1

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?

+1  A: 

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

Gabe
Thanks, Thats actually the library I'm currently using, and the whole IR distance seems to be working
Nate Gates