I'm making a Pygame program for a school project. The player character will pass through an enemy sprite without triggering the collision. How do I fix this?
CODE should be run if there is any overlap between the two sprites.
if CharY > thing_starty and CharY < thing_starty + Enemy2_height or CharY+PCHeight > thing_starty and CharY + PCHeight < thing_starty + Enemy2_height:
if CharX > thing_startx and CharX < thing_startx + Enemy2_width or CharX + PCWidth > thing_startx and CharX + PCWidth < thing_startx + Enemy2_width:
CODE