Hello, I am trying to make my script of NPC’s that follow me fill in the gaps of a circle.
Basically I want them to fill in the empty gaps while making a circle every time.
I have tried using linear diminishing returns but it didn’t work. Here is the code:
What’s your formula for RotationMultiplier here? The picture makes it look like it’s just the circle’s radius, but you mentioned using “linear diminishing returns”?
The perimeter of a circle of radius R increases linearly as R increases linearly, so the distance of the Nth character should be roughly proportional to sqrt(N). If you make RotationMultiplier equal k * math.sqrt(N) (where k is some factor you can play around with, and N is the character index), you should get characters organized in a tightening spiral. Play around with k * math.sqrt(math.floor(a*N)) (a is another factor you can play with) and you might eventually get neat circles. Add a little bit of randomness to make it look more natural. How’s this turn out?