Shotgun Spread using rotation

Godot Version

4.2.1

Question

I am making a shotgun for my game, currently I have 5 raycasts in a ray container node and I randomize their position on every shot, but this makes it so the spread is thesame disregarding the distance to the target, how could I fix this? I was think ing of rotating them in a similar way but I couldn’t find a way to do that. Here is current code:
for r in pc.get_children():
r.transform.origin.x = randf_range(spread, -spread)
r.transform.origin.y = randf_range(spread, -spread)