View Single Post
  #2  
Old 08-04-2008, 02:54 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
When specifying the position to walk to, you can use a node as the Y value of the position. This will cause the walkTo action to set the height of the avatar to the height of the terrain. Here is an example:
Code:
import viz
viz.go()

#Add terrain model
terrain = viz.add('tut_ground.wrl',euler=(0,-10,0))

#Create walk action that follows terrain height
walkAction = vizact.walkTo([0,terrain,10])

#Add action to avatar
avatar = viz.add('vcc_female.cfg')
avatar.addAction(walkAction)
Reply With Quote