Hello,

I am trying to write a script that create multiple cube and place them at the same distance from the origin. I want them to create a circle with cube and i want those cubes to be at the same distance between them.

I only succed to create cube at them distance from origin but no at the same distance between them.

Here is my script.

import maya.cmds as cm

import math

cubeList = []

for i in range(0,60):

cube = cm.polyCube ()

cubeList.append(cube)

def moveObj(obj,a,b):

cm.setAttr(obj +’.translateX’,a)

cm.setAttr(obj +’.translateZ’,b)

for i in range(0,len(cubeList)):

angle = i * (360/(i+1))

x = 10*math.cos(angle)
y = 10*math.sin(angle)

moveObj(cubeList[i][0],x,y)

Can someone help me ?

Thanks