I'm using this code to detect the collision
if runner.rect.colliderect(crate): if runner.rect.y < runner.groundy: runner.reset_jump()
the collision detection works fine for the sides which use the same if statement as the collision detection for the top of the crate.
my image and rect are setup like this
self.image = pygame.image.load("runner.png").convert_alpha() self.rect = self.image.get_rect()
thanks in advance!