Creting a circle with bullets godot4

Godot Version

v4.2.2.stable.official

Question

Hello people! This might be a little bit of a math question more than it is related to the engine itself, but i can’t wrap my head around it :frowning:
So I’m trying to make a bullet hell game. One of the attacks I’d like the enemy to have is to shoot bullets in a circular form, what I’ve come up with is that if I divide 2PI by the number of strings (found out that in order to make a pretty normal circle it’d be 20) it should be able to generate a bullet in each of the points. But I don’t know how to code that every bullet should be created equidistant from the last one :nerd_face:

Hope that someone can lend out a hand ;w;

for i in range(20):
	var bullet = Sprite2D.new()
	bullet.texture = load("res://icon.svg")
	bullet.position = Vector2(200, 0).rotated(2 * PI / 20 * i)
	add_child(bullet)
2 Likes