Help with pet movement positioning

How do I add another pet row after the previous row has five pets already?

The red line will be another row of pets, which will contain five pets per row.
image

1 Like

Just make the radius be equal to math.ceil(i/5) * 1, with i being which number pet it is. If i is equal to 1 to 5 it’ll be less or equal to 1, so with math.ceil we automatically round it upwards. Now that is what we do for the radius.

Now you want to use i2 = (i-1)%5 +1, this will be used for the angle. It is called the remainder.
Let’s say i = 10, then the result of the above forumla is equal to 5, if i = 15 -> i2 = 5
If i = 8 then i2 is equal to 3 etc.

Now just fill them in there with those equations.

1 Like

you need to learn stuff like tangent and other trigonometric functions so this will become so much easier

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