View Single Post
  #1  
Old 09-29-2009, 04:29 AM
Andy Andy is offline
Member
 
Join Date: Mar 2008
Location: Germany
Posts: 36
animation sequence

If I have a node3d object and call an animation state, is it possible to stop the action on the last position and start a new action state on this position (like a sequence of animations)?

I my application I would like to move a robotic gripper in a close position and open position.

Code:
#add robiGrip - default position is closed
robiGrip = viz.add("gripper.cfg") 	

def onkeydown(key):
	if key == 'o':
		print 'open'
		robiGrip.setAnimationSpeed(0,1)
		robiGrip.state(1)
	elif key == 'c':
		print 'close'
		robiGrip.setAnimationSpeed(0,1)
		robiGrip.state(2)
	elif key == 'p':
		print 'pause'
		robiGrip.setAnimationSpeed(0,0)
	elif key == 'r'
		print 'resume'
		robiGrip.setAnimationSpeed(0,1)
Reply With Quote