| View previous topic :: View next topic |
| Author |
Message |
joshue
Joined: 22 Mar 2008 Posts: 2
Digg It |
Posted: Sat Mar 22, 2008 9:05 pm Post subject: IR: accessing X and Y data WITHOUT setting the mouse cursor? |
|
|
I'm interested in getting X and Y data for use as a pointer, but not actually setting the position of the actual system mouse cursor. (I'm using multiple wiimotes for a multi-user drawing program).
setting the mouse seems to be a capability of wiiremoteJ but I can't figure out how to use the script to access the X and Y position data without setting it.
apologies if this is obvious or easy to do - if someone could point me in the right direction I would be hugely appreciative. maybe there is a good script for converting the IR data out there (taking into account the roll of the wiimote).
thanks so much!
=josh |
|
| Back to top |
|
 |
Cha0s Site Admin
Joined: 17 Jan 2007 Posts: 421
Digg It |
Posted: Sun Mar 23, 2008 12:40 am Post subject: |
|
|
Well, you have to do the calculations manually. But you can get raw position data (a value from 0 to 1 indicating where the dot was seen) by using the IREvent class and a WiiRemoteListener. For more details, check out the API docs.  _________________ Cha0s |
|
| Back to top |
|
 |
joshue
Joined: 22 Mar 2008 Posts: 2
Digg It |
Posted: Sun Mar 23, 2008 2:36 am Post subject: |
|
|
ah I see.
the reason I was asking was that I saw the wiiremotej.WiiRemoteMouse and wiiremotej.IRMouse interfaces,
specifically the IRMouse.processMouseEvent and thought that they were doing those calculations internally: now I see it just takes an average of each of the four light points and computes a center point from that...
thanks for the clarification. might be a nice addition to add in a future version of wiiremotej |
|
| Back to top |
|
 |
|