car animation


import maya.cmds

cmds.polyPlane(w=10, h=75)

cmds.move(0,-0.5,30)

cmds.polyCube(h=1, w=2, d=5)

cmds.move(0, 1, 1.5)

for i in range(3):

    cmds.polyCylinder(r=0.5)

    cmds.rotate('90deg', z=True)

    cmds.move((i*1.5), z=True)

    

cmds.sets("pCylinder1", "pCylinder2", "pCylinder3","pCube1", n='car_set' )

animationRange=6

cmds.select("car_set")

for i in range(animationRange):

    cmds.currentTime((i)*20, edit=True)

    cmds.move(5, z=True, r=True)

    cmds.setKeyframe(at=('translateZ')) #can try add ease in/out with itt/ott 

Leave a comment

Log in with itch.io to leave a comment.