[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Pygame, cwiid and ode - movement



Oh and the resolution of the IR camera is 1024x768, so use that when you're translating the pixel space coordinates into real world units. (Your IR data will be the brightness/largeness of the point as one unit, and the X and Y values as the other units.)

On Thu, Aug 7, 2008 at 10:00 AM, Dan Krol <orblivion@xxxxxxxxx> wrote:
Hmm, I bet it be useful to have a library function that calculates that for you.

On Thu, Aug 7, 2008 at 9:33 AM, Luke Paireepinart
<rabidpoobear@xxxxxxxxx> wrote:
>
>
> On Thu, Aug 7, 2008 at 4:53 AM, Hugo Arts <hugo.yoshi@xxxxxxxxx> wrote:
>>
>> you might want to post this on a wiimote development oriented mailing
>> list/forum.
>> This is not really a pygame-related question. At least include some
>> additional
>> details. Your question is really vague.
>>
>> Perhaps you will also benefit from reading this:
>> http://www.catb.org/~esr/faqs/smart-questions.html#intro
>>
>> Hugo
>>
>> On Thu, Aug 7, 2008 at 11:39 AM, flx <xf3l1x@xxxxxxxxx> wrote:
>> > Hi all
>> >
>> > I'm trying to make a foosball [1] game wth pygame, using the wiimote
>> > to control the bars.
>> >
>> > I've managed to control the rotation using the accelerometers, but i
>> > can't get the sliding part right. I've been asked to use the ir
>> > sensors for the sliding movement, but I just can't get it right.
>> >
>> > Have someone done this before? is there anywhere i can look for a
>> > similar usage of the wiimote or ask for help?
>
> Just keep track of the 2 biggest IR points, and use trigonometry to
> calculate the distance to the edge between the IR based on their spacing.
> Then use the default IR spacing of the Wii hardware (and a camera field of
> view of 45 degrees) to calculate how far you are from it.
> It's pretty simple math.
> Check wiibrew.net/com/org (whichever it is) and wiili.org, specifically the
> Wii Remote articles.  They have some details about IR.
> Let me know if you have more specific questions about the Wii Remote (you
> can ask me off-list if you want.)
> -Luke
>>
>> >
>> >
>> > [1] - http://en.wikipedia.org/wiki/Table_football
>> >
>> > --
>> > .__.·º(foolhu!)
>> > (oO)
>> > / | | \
>> >
>
>