# How to make an enemy shoot a (top down) shotgun like pattern? (I can't get the bullets' spawn position correctly)

Attention Topic was automatically imported from the old Question2Answer platform.

Hi! I’m currently using this solution:
Currently, it doesn’t aims to the player well, and I don’t know how to fix that. It always aims off.
Thecnical stuff:
I’m rotating a vector2 (radius) and spawn the bullets at it’s position. I’m making a regular node (center) look_at() the player, and add it’s rotation to the vector2 (radius)
(The player and the enemy are KinematicBody2D-s and the bullets are Area2D-s wich have their global_position updated.)
I’m using a lot of ideas from this queastion’S 2nd aswer:
https://forum.godotengine.org/12826/spawning-objects-around-a-circle

This is how it aims: (The flame thingy shows the rotation of the center,
but as you can see, the bullets are not spawned at a correct position)

And this is how it should work: (The lines are just helping to visualize)

(If you need any more information, just say it, because I don’t know what else to say.)
BTW the visuals will be worked on after I will fix the main BUGs in the game. (just like this one)

export(int) var shoot_angle = 90  # in degrees
export(int) var numb_of_bullets = 3
export(float) var time_between_shots = 0.5
var angle_step = shoot_angle / numb_of_bullets

center.look_at(player_node.global_position)

for i in range(numb_of_bullets):
var spawn_pos = center.global_position + radius.rotated((center.global_rotation / 2) + angle_step * i) # * sign(center.global_rotation / 2))

var node = bullet.instance()
node.global_position = spawn_pos
node.move_direction = global_position.direction_to(node.global_position)