# Update the angle of the given light
pos = pymunk.pygame_util.to_pygame(pos, pygame.display.get_surface())
distance = pos - self._dragging.position
angle = math.atan2(distance[1], distance[0])
# Set light angle to this position
self._dragging.ray_manager.direction = math.degrees(angle)
# Update the angle of the given light
pos = pymunk.pygame_util.to_pygame(pos, pygame.display.get_surface())
distance = pos - self._dragging.position
angle = math.atan2(distance[1], distance[0])
# Set light angle to this position
self._dragging.ray_manager.direction = math.degrees(angle)