title: How to change the size of a collision box of a circle sprite in pygame
body: <p>I am designing a game however I have postponed my development to focus on the collisions of sprites in the shape of circles.</p>
  
  <p>I am not 100% sure how the 'pygame.sprite.collide_circle' command works with its parenthesis however I have included it within my Collidecheck variable as well as created a new variable called 'collided' to then include within Collidecheck as 'collided = None'. </p>
  
  <p>My Ball class uses the ball objects which are all circles. There are two which should interact being ball and llab.</p>
  
  <pre><code>class Ball(pygame.sprite.Sprite):
      def __init__(self, width, height, herex, herey):
          super().__init__()
          self.image = pygame.Surface([width, height])
          self.image.fill(WHITE)
          self.image.set_colorkey(WHITE)
          self.rect = self.image.get_rect() 
          pygame.draw.circle(self.image, BLACK, [int(width/2),int(height/2)], int(width/2), 10)
          self.rect.x = herex
          self.rect.y = herey
  
      def moveRight(self, pixels):
          self.rect.x += pixels
      def moveLeft(self, pixels):
          self.rect.x -= pixels
      def moveUp(self, pixels):
          self.rect.y -= pixels
      def moveDown(self, pixels):
          self.rect.y += pixels
  </code></pre>
  
  <p>The 2 circles are in sprite groups as I am practising using them</p>
  
  <pre><code>ball = Ball(100, 100, 50, 50)
  llab = Ball(100, 100, 350, 250)
  
  g = pygame.sprite.Group(ball)
  h = pygame.sprite.Group(llab)
  </code></pre>
  
  <p>Within the main game loop, ball moves so I can test the hitboxes. If you watch the console as it is printing the collision check, you can see it working.</p>
  
  <pre><code>    keys = pygame.key.get_pressed()
      if keys[pygame.K_LEFT]:
          ball.moveLeft(5)
          ballFollow.moveLeft(5)
      if keys[pygame.K_RIGHT]:
          ball.moveRight(5)
          ballFollow.moveRight(5)
      if keys[pygame.K_UP]:
          ball.moveUp(5)
          ballFollow.moveUp(5)
      if keys[pygame.K_DOWN]:
          ball.moveDown(5)
          ballFollow.moveDown(5)
  
      Collidecheck = pygame.sprite.spritecollide(ball, h, False, pygame.sprite.collide_circle)
      print(Collidecheck)
      screen.fill(RED)
  
      g.draw(screen)
      h.draw(screen)
  </code></pre>
  
  <p>I originally expected to see within the console the collision be between ball and llab but ball and llab have a really large hitbox which I don't want. I want to only see the hitboxes of both these circles extend to their actual shape and no larger. It seems their hitboxes are double their sizes I think although I am not sure</p>
  
  <p>P.S I understand I could use maths and might have to, I was wondering if anyone had better knowledge of the sprite functions to help me.</p>