I made this code to make a circle follow my mouse but the movement is really mechanic and does not give the 360 degrees of movement I desired.
Here's the code:
mx, my = pygame.mouse.get_pos()
for event in pygame.event.get():
if event.type == pygame.QUIT:
Running = False
mpos = (mx, my)
X = (playerX)
Y = (playerY)
if mpos[1] >= Y:
playerY += vel
if mpos[1] <= Y:
playerY -= vel
if mpos[0] <= X:
playerX -= vel
if mpos[0] >= X:
playerX += vel