[WiiFlash] improving IR mapping

Usman "Ozzy" Farman ozzy at lolzllc.com
Mon Jan 21 14:03:09 PST 2008


It seems to me that the field of view of the wiimote is a little less on 
the horizontal axis if you are close to the sensor bar, move the bar 
further away from you and it should ease up, also, if its really jumpy 
be sure to turn off any incandescent bulbs around... took me a while to 
figure that out. :)



christopher watts wrote:
> Greetings, i am using the wiimote IR data to make a point to the 
> screen in flash, similar to using it to control a mouse.I am able to 
> get the coordinates to work fine, but the motions seems a little 
> sloppy and jumpy. The IR data does not seem to match the screen data 
> exactly. I am using a 16:9 screen ratio but it still seems to map a 
> little off in the horizontal. below is an example of the basic test 
> code i am using.
>
> Does anyone have any advice for interpolating the IR data to make the 
> movement smoother and more accurate for a given screen size?
>
>
>
>
> function frameHandle (e:Event) {
>    
> trace ("frane handler running", 
> myWiimote.ir.x1,myWiimote.ir.x2,myWiimote.ir.y1 )
>    
>     pointOne.x= ((1-myWiimote.ir.point1.x) * 1024)
>     pointOne.y= (myWiimote.ir.point1.y * 576)
>    
>     pointTwo.x= ((1-myWiimote.ir.point2.x) * 1024)
>     pointTwo.y= (myWiimote.ir.point2.y * 576)
>    
>    
>     if (myWiimote.ir.p1==true && myWiimote.ir.p2==true) {
>        
>         var thePoint:Point = Point.interpolate( 
> myWiimote.ir.point1,myWiimote.ir.point2 ,.5)
>        
>         pointInt.x = ((1-thePoint.x) * 1024)
>         pointInt.y = ((thePoint.y) * 576)
>     }
> }
> ------------------------------------------------------------------------
>
> _______________________________________________
> WiiFlash mailing list
> WiiFlash at osflash.org
> http://osflash.org/mailman/listinfo/wiiflash_osflash.org
>   


-- 
---------------------------------------
Ozzy Farman
Managing Director / Partner
LOLZ LLC.

Phone: (212) 812-4189 ext. 1
http://www.lolzllc.com


............................................................................
This communication is confidential and is only intended for the use of the individual or entity to which it is directed.  It may contain information that is privileged and exempt from disclosure under applicable law. If you are not the intended recipient please notify us immediately. You should not copy it or disclose its contents to any other person.
............................................................................ 




More information about the WiiFlash mailing list