Is there a simple method for generating points around a character no many how much points there are? This is useful for pet systems from simulators, magic based games, card games, stuff like that. It’s also just something I really find intriguing.
Anyways this is pretty much the only method I could come up with for it, but it’s incomplete and I’m unsure where to continue, or if I’m doing it wrong.
function createCircle(num)
local increment = 1 / num
for i = 1, num, increment do
local part = Instance.new("Part") -- just a part for visualizing
part.Size = Vector3.new(.5,.5,.5)
part.Anchored=true
part.CFrame = bla -- i'm really just unsure how the math works
end
end
createCircle(5) -- should create 5 points around your character
The for loop is supposed to loop depending on how many items should be around your character. The increment is for adjusting the scale of the position based on the number of items. That’s pretty much how far I got, I can’t really think up any algorithm for the cframing part.