2017-04-20 14 views
1

2つのrectが特定の側で衝突した場合はどうすれば見つけることができますか? (rect1.rect.top、rect2.rect.bottomなど)rect1.rect.colliderect(rect2)pygame.sprite.collide_rect(rect1, rect2)を試しましたが、個々のサイドコリジョンは見つかりませんでした。Pygame - 横並びの角の衝突

答えて

1

心配しないで、答えを見つけました。 if rect1.rect.bottom >= rect2.rect.top and rect1.rect.bottom <= rect2.rect.bottom: