WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-19-2013, 09:43 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You can use viztask.waitAll to wait for a specified set of actions to complete. Here is an example:
Code:
import viz
import vizact
import viztask
viz.go()

Object1 = viz.add('beachball.osgb',pos=(-1,2,5))
Object2 = viz.add('soccerball.osgb',pos=(1,2,5))

def MainTask():

	yield viztask.waitKeyDown(' ')

	spin1 = vizact.spinTo(euler=[90,0,0], speed=45)
	spin2 = vizact.spinTo(euler=[0,90,0], speed=45)

	waitSpin1 = viztask.waitTask( viztask.addAction(Object1, spin1) )
	waitSpin2 = viztask.waitTask( viztask.addAction(Object2, spin2) )

	yield viztask.waitAll( [waitSpin1, waitSpin2] )

	print 'finished'

viztask.schedule( MainTask() )
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Transparency on multiple objects NASA GRC Vizard 0 03-15-2010 12:46 PM
removing multiple objects durf Vizard 7 08-05-2009 09:15 AM
run multiple actions simultaneously durf Vizard 1 05-08-2009 12:17 PM
multiple objects durf Vizard 1 04-10-2009 01:42 PM
Problems with making multiple objects from one .wrl? mjabon Vizard 3 07-10-2007 01:23 PM


All times are GMT -7. The time now is 07:24 PM.


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