View Single Post
Old 05-15-2009, 11:46 AM
nasr nasr is offline
Join Date: Apr 2009
Posts: 27
def toggleLink():
	global link
	if link:
		#If link exits, stop grabbing
		link = None

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

vizact.onmousedown(' ' ,toggleLink())
i wrote this code for grabbing the first object and then releasing it and then trying to hold the second object..but its not working...paul can u tell me where is the problem?
Reply With Quote