How can I find if two rects collide on a certain side? (e.g. rect1.rect.top, rect2.rect.bottom) I've tried rect1.rect.colliderect(rect2) and pygame.sprite.collide_rect(rect1, rect2), but they don't find the individual side collisions.
Never mind, I found the answer. if rect1.rect.bottom >= rect2.rect.top and rect1.rect.bottom <= rect2.rect.bottom:
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more