I am using pygame to make a simple game. I am having issues with circle collisions. I am getting the following error:
"AttributeError: 'pygame.Rect' object has no attribute 'rect'"
Here is the particular code I am having issues with below:
if pygame.sprite.collide_circle(hero_circle, enemy_circle):
gameover()
Use pygame.mask
to create a collision mesh for your objects and use the mesh to do collision detections.
In more detail:
(Technically this is just doing collision detection of a circle shaped area on a rectangle, but who cares!)