I've been trying to figure out how to detect collision in pygame I've look online for some examples and help but the ones i find don't work or i can't understand. I want a object (Car) to go to a x and y position when object (thing) collides with it here is the code can you try to make a working version or explain it
if pygame.sprite.collide_mask(car, thing):
x = 300
y = 250
btw this is my third attempt and it did not work.