how to make particles follow my mouse in pygame
问题 I'm trying to make sure that the particles that arise when I click my mouse follow my mouse. For some reason, the particles just follow me to the top left. Can anyone tell me what I am doing wrong? Here is my code: import pygame import sys import random import math from pygame.locals import * pygame.init() clock = pygame.time.Clock() screen = pygame.display.set_mode((500,500)) particles = [] while True: screen.fill((0,0,0)) for event in pygame.event.get(): if event.type == MOUSEBUTTONDOWN: mx