View Single Post
  #3  
Old 01-19-2010, 05:37 PM
wchoi wchoi is offline
Member
 
Join Date: Jan 2010
Posts: 2
Dear Jeff

We made the code to connect the next motion at the position of last frame of first motion.

Please check the code and give me the comment.
---------------------
code:
---------------------
import viz

viz.go()

viz.clearcolor(viz.SKYBLUE)

#Position avatar in view
avatar = viz.add( 'vcc_male.cfg' )
avatar.setPosition( 0, 0, 20 )
avatar.setEuler( 90, 0, 0 )
#Create an action to fade out in 5 seconds
#fadeOut = vizact.fadeTo(0,time=5)

#Add the ground plane
viz.add('tut_ground.wrl')

#Create an action to move to location (0,1,0) at 5 m/s

#Add the fade out action to the node
#avatar.addAction(fadeOut)

#Add the moveTo action to the node
#It won't start until the fade out action completes
avatar.addAction( vizact.animation(7,2.685,0.1,0) )
moveTo = vizact.moveTo([1.8,0,20],speed=900000000000000000000000000000)
avatar.addAction(moveTo)
avatar.addAction( vizact.animation(6,2.685,0.1,0) )
#moveTo1 = vizact.moveTo([3.6,0,20],speed=90000000000000000000000000000)
#avatar.addAction(moveTo1)
avatar.addAction( vizact.animation(7,2.685,0.1,0) )
moveTo2 = vizact.moveTo([3.6,0,20],speed=90000000000000000000000000000)
avatar.addAction(moveTo2)
avatar.addAction( vizact.animation(10,2.685,0.1,0) )
#moveTo3 = vizact.moveTo([7.2,0,20],speed=90000000000000000000000000000)
#avatar.addAction(moveTo3)
-------------------------------------------------

Best regards,
choi
Reply With Quote