I want to make special collisions with pygame. I have a sprite Balland BlockI want to know which side of the block the ball collided with.
Ball
Block
Perhaps this is possible with pygame.sprite.groupcollide()custom collidedas they call it. But I did not find the answer to this question. Is there any way to do this?
pygame.sprite.groupcollide()
collided
Yes it is possible. You are also right in the conflict of arguments.
What you need to do is write a function that takes 2 sprites and returns a boolean value.
, , , true, .
rect, , , , .
, , A, B , , . , A , A.
pygame, :
pygame
, :
pygame.sprite.spritecollide()
pygame, . ,
pygame.sprite.collide_mask()
" , , None, .
, . "", , . * collide. "" "".
, . , , , ".
, .
-Harry