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

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



2008/8/7 Luke Paireepinart <rabidpoobear@xxxxxxxxx>:
>
>
> 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.
that's more or less what i was doing, but it didnt gave me the
expected result, mostly because reflections and sources going out of
sight.

I'm trying to dealt with reflections tracking only points with, more
or less, the same distance between them that they had the last time I
registered them, but if you loose sight of one the ir source it acts
weird.

I'm thinking in a hybrid, acc + ir, way of achieving this.

> 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

Thank you very much, I didn't know wiibrew.org and it looks promising


-- 
.__.·º(foolhu!)
(oO)
/ | | \