WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-18-2009, 01:07 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Use the viz.ACTION_END_EVENT to notify you that the action has completed on your object and then within your callback function use <node3D>.remove() to permanently remove the object from the scene.
Code:
import viz
viz.go()

spin = vizact.spin(0,1,0,90,5)

ball = viz.add('ball.wrl',pos=(0,1.8,2))
ball.addAction(spin)

def onActionEnd(e):
	if e.object is ball and e.action is spin:
		ball.remove()
		print 'Ball is removed'

viz.callback(viz.ACTION_END_EVENT,onActionEnd)
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 07:53 PM.


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