View Single Post
  #5  
Old 05-12-2009, 11:22 AM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
Better. Replace elif with if.
Code:
def toggleLink():
	global link
	if link:
		#If link exits, stop grabbing
		link.remove()
		link = None

	if vizmat.Distance(hand.getPosition(), ball.getPosition()) < .5:
		link = viz.grab( hand, ball )

vizact.onpick(ball,toggleLink)
__________________
Paul Elliott
WorldViz LLC
Reply With Quote