I am trying to make an array of columns and rows like this:
but when I run my code
I get
why is this?
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.
Sign up to join this communityNot sure this question is really suited here, but well…
x = 0
y = 0
for row in range(rows):
x = x + scene.formationArrayColumnMargin
for ag in range(int(agentsPerRow)):
y = y + scene.formationArrayRowMargin
y
must be reset to zero each time you run outer x
loop, otherwise it keeps growing. Something like that:
x = 0
for row in range(rows):
y = 0
x = x + scene.formationArrayColumnMargin
for ag in range(int(agentsPerRow)):
y = y + scene.formationArrayRowMargin