Search Unity

Wiimote, IR and distance from the screen

Discussion in 'Scripting' started by TheLorax, Mar 26, 2007.

  1. TheLorax

    TheLorax

    Joined:
    Mar 25, 2007
    Posts:
    86
    Is anyone here working with Darwiinremote/Jarwiinremote and using the IR sensor bar to get the distance from the screen? We're getting the numbers into Unity from the IR sensor, but we have no idea what to do with it as far as telling if the Wiimote is moving towards or away from the screen. Any help appreciated!

    Also, are we still stuck using Jarwiinremote to write the data and then reading it into Unity, or has a new way using the Darwiinremote Framework been looked at?

    Thanks!

    TheLorax
     
  2. aaronsullivan

    aaronsullivan

    Joined:
    Nov 10, 2005
    Posts:
    986
    I can tell you how the wiimote works and you can see if that helps. :)

    The sensor in the wiimote looks for two infrared lights. It can use this for positioning, and also can tell whether you are twisting the wiimote by using the relationship between the two lights (above/below or side by side.)

    You would tell the distance from the "screen" by comparing the distance between the two lights (perspective changes this.) The problem is this is not always a constant (you can get the wiimote to work by pointing at regular lightbulbs for instance.)

    You can tell a change in distance by how far apart the two lights are. As long as the user is using a the standard distance for the IR lights, you could get a constant distance reading, otherwise, you'll just have to use relative motion measurements.

    I have no idea how the software you are using works, however. Don't know if that will help. Hope it does. :D