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

Re: [pygame] Struggling with mouse input



On Wed, 1 Dec 2004 08:24:44 -0500 (EST), Dave Mikesell
<dm@gildedring.com> wrote:
> Basically, I'm catching MOUSEMOTION events and comparing the X values from
> the current and previous frames to determine which direction to turn.

Not sure without actually seeing your code, but you shouldn't have to
compare any values with the previous frame. Just use the 'rel'
attribute from all MOUSEMOTION events to get the relative x-movement
and apply that to your ship.

-- 
Sami Hangaslammi