Welcome! Log In Create A New Profile


how to calibrate wiimote ir?

Posted by ahrimanes 
how to calibrate wiimote ir?
October 21, 2009 05:52AM
hi im doing some kind of shuthing game, and i need the wiimote ir to give me ir1.sx =320 , ir1.sy=240 when im pointing at the center of my screen..... it actually givesme values of ir1.sx =470 , ir1.sy=130,

when i point to the left x is 0 ok but when i point to left the x value gorws like madness

its soooooo frustrating, i wont use a cursor to point the gun.... i want it working as the old scool ligth gun..

the thing if how can i get a more realistic x y values depending on my screen ... i have a 42" lcd .. wide screen...
Re: how to calibrate wiimote ir?
October 21, 2009 07:17AM
Call WPAD_SetVRes(0,640,480); after initializing the wiimote and read the x and y members instead of sx and sy OR have in mind that sx ranges from 0 to 1024 and sy ranges from 0 to 768 and write a formula to get your desired values.

My guess about your sy results is that your sensor bar is below the screen, am I wrong? Wiiuse assumes the sensor bar is above the TV by default.


Edit: Extra information.

Edited 1 time(s). Last edit at 10/21/2009 07:31AM by Aruskano.
Re: how to calibrate wiimote ir?
October 21, 2009 10:17PM
hoo thanks i will test that as soon as ai arrive home...

my sensor is below my screen, it uses to be avobe but due to this problem i changed position and config on wii menu... but nothing chages..
Re: how to calibrate wiimote ir?
October 22, 2009 03:58AM
hiiii .. im was cheking the code i use on my project and it has already the line WPAD_SetVRes(0,640,480); i did change the ir1.sx to ir1.x and ir1.sy to ir2.y and its hell yeha bether than before,(sensor bar above the tv)...when i point to the center my cursor is in the center... it just have a litle Lack of coordination in X... is there a way to fix that ?
Re: how to calibrate wiimote ir?
October 22, 2009 05:14AM
Place the sensor bar perfectly centered and in line with the TV and hold the wiimote exactly at the center of the sensor bar. lol.

Seriously, I don't see anything to fix. You shouldn't be making a game/whatever needing THAT much accuracy anyways (we, players, are humans not machines!), try it as it is and see if it ruins the gameplay, if it does think on a codeable workaround and write it.

As for the question. Wiiuse (and libogc) is an opensource library so yeah it's possible to change the way the data sent from the wiimote is interpreted but, again, I think it's unnecessary and probably not an easy task (like a hardware limitation or so) because if it was easy [I guess] it would be already in libogc.

Re: how to calibrate wiimote ir?
October 22, 2009 10:12AM
hoooo the sensorbar is placed correctly and... wait a minute lol jajajaja.

i already have some targets on screen and its so frustrating to shothem.... sooooooo...

tonight i was playing links cros bow traing and i see there is a x y correction to place wimote in te center and its place curcursor en the center but having x y lack of cordinates ... so i get an idea... make a calibration class or somthing :P based on that... can be done with the corners too... the user mus point to each corner and ajust the valus like in link's cross bow..... having...

|1............................ 2|
| ...............................|
| ...............c...............|
| ...............................|

x1,xc,x2 correction values being a kind of factor modifier of irN.x
y1,yc,y2 correction values being a kind of factor modifier of irN.y

i will think on this idea to see if its good to do or somthing similar... need some maths in here. jejejeje

Edited 2 time(s). Last edit at 10/22/2009 10:19AM by ahrimanes.
Sorry, only registered users may post in this forum.

Click here to login