View Single Post
  #13  
Old 05-15-2009, 12:28 PM
nasr nasr is offline
Member
 
Join Date: Apr 2009
Posts: 27
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 )
	if vizmat.Distance(hand.getPosition(),crank.getPosition()) < .5:
		link=viz.grab ( hand, crank)

vizact.onpick(viz.MOUSEBUTTON_RIGHT ,toggleLink)
paul im trying with this mouse event..but still not able to select any one object at this time...
Reply With Quote