The following (abridged) bit of code is inside the main loop. What I expected to happen was the entity's position to update due to velocity, then update again if it's touching a static object before drawing rects and updating the display, but when run, an entity approaching a static will always visibly intersect with the static for one frame before moving back out, like it's running
ent/stc.load() (a method for drawing rects) and
pygame.display.update() multiple times during each loop.
pygame.Surface.fill(window,(100,0,0)) for stc in statics: stc.load() for ent in entities: ent.vel+=ent.acc ent.pos+=ent.vel for stc in statics: if ent.rect.colliderect(stc): if ent.vel>0: ent.acc=0 ent.vel=0 ent.pos=stc.rect.left-ent.box ent.load() clock.tick(60) pygame.display.update()