white, black = (255, 255, 255), (0, 0, 0)
ray_mask.fill(black)
- for shape in self.body.shapes:
- if shape is self.fitting:
- continue
- pygame_poly = [
- pymunk.pygame_util.to_pygame(v, surface) for v in
- shape.get_vertices()]
+ for pygame_poly in self.ray_manager.pygame_polys(surface):
pygame.draw.polygon(ray_mask, white, pygame_poly, 0)
pygame.draw.aalines(ray_mask, white, True, pygame_poly, 1)