Spawning enemies on a circular line

So i want to spawn enemies on this circular line. Can someone help me about how can i do it?

1 Like

its pure math, you can use trigonometry (for example the unit circle can help) or you use vector geometry and take the center, a radius and angles and sort of shoot out beams which you calculate using geometry/math

personally I would do this:


I would do this calculation for 360 times for 360 enemies on each degree, if you want 20 enemies you do this 20 enemies every 360/20 = 18th degree

4 Likes
for angle = 1, 360 / amountOfEnemies do
    -- originCF is a CFrame that it will be spawning around, so it's the center in
    -- this case
    local cf = originCF * CFrame.Angles(0, math.rad(angle), 0)
end
1 Like

oh and if you wan’t to manage how far it is from originCF you can multiply final cf by CFrame.new(0, 0, -distance)

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.