Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pygame rect collisions

#For detecting collisions in pygame
Rect1 = pg.Rect(x, y, width, height)
Rect2 = pg.Rect(x, y, width, height)
if Rect1.colliderect(Rect2):
  #Do something
 
PREVIOUS NEXT
Tagged: #pygame #rect #collisions
ADD COMMENT
Topic
Name
6+7 =