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

Re: [pygame] Detect dragging of main window



Mirroring ian, you can make sure dt never gets too big:

def update(self):
    last = self.now
    self.now = pygame.time.get_ticks()
    dt = (self.now - last) / 1000.   
   
    # truncate dt to keep it reasonable
    if dt > max_dt: dt = max_dt   
    update_units(dt)
--
Jake