[Flii] Converting Wiimote readings to roll/pitch
Pete Hobson
pete at freesome.com
Sun Apr 1 11:09:02 EDT 2007
Hey adam,
I have it working, as you did for single axis movement, right now
the maths break down when they are combined however.
for example :
var fx:Number = (Flii.WiiRemoteACx-Flii.WiiRemoteAccX_zero)/(155-
Flii.WiiRemoteAccX_zero);
var fz:Number = (Flii.WiiRemoteACz-132)/(159-132);
//alpha is pitch
var alpha:Number = Math.atan2(fx,fz);
pCar.rotationZ=((180*alpha)/Math.PI );
The constants should be replaced with values from the zero point
settings on the wiimote (i havn't yet done this)
My thoughts on this is that at present these conversions should be
done right up at the AS level, and once the maths are working
properly we move them down lower into the server...?
On 1 Apr 2007, at 15:25, Adam Robertson wrote:
> Hi,
>
> I've still not figured out the math to convert the Wiimote's motion
> sensor readings into nice easy to use roll & pitch values, as
> GlovePie already does internally. Any suggestions?
>
> Pete, you were going to ask a friend about this, did you ever get
> an answer?
>
> A
>
> _______________________________________________
> Flii mailing list
> Flii at osflash.org
> http://osflash.org/mailman/listinfo/flii_osflash.org
More information about the Flii
mailing list