- shapes = self.shapes_for_ray_polys(
- calculate_ray_polys(space, self.body, self.position, LIGHT_FILTER))
- for shape in shapes:
- shape.filter = LIGHT_FILTER
- self.fitting.filter = FITTINGS_FILTER
- space.add(self.body, self.fitting, *shapes)
+ self.ray_manager.generate_rays(space, self.position)
+ ray_shapes = self.ray_manager.polys()
+ space.add(self.body, self.fitting, *ray_shapes)