WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-03-2009, 09:36 AM
durf durf is offline
Member
 
Join Date: Feb 2009
Posts: 61
Gravity

Hello,

I have made a 2d array of pillars. I am trying to make all of these pillars drop to a certain plain. I am just a little confused about what I need to do. Below is the code that pertains to my nested for loops which create the pillars. I have looked into viz.gravity() and figured that is the best route. Just not sure where or really how to impliment this.

Code:
 
columns = [-20, -10, 0, 10, 20]
rows = [0, 6, 12, 18]
pillars = []

for x in columns: #creates an array of pillars
     for y in rows:
          pillar = OrginalPillar.copy()
          pillar.translate(0+x, 0, 0+y)
          pillar.setScale(1,1,1)
          pillar.visible(viz.OFF)
          pillars.append(pillar)

number = 0
def showPillar():
      globae number
      pillars[number.visible(viz.ON)
      number += 1
vizact.ontimer2(.5,len(pillars)-1,showPillar)
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:50 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC