Thread: Avatar
View Single Post
  #2  
Old 03-24-2009, 09:06 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Within your keyboard callback function get the avatar's position and, for example if viz.KEY_UP is pressed, create a walkTo action where the z value is incremented. Something like this

Code:
pos = avatar.getPosition()

if key == viz.KEY_UP:
	walk_Forward = vizact.walkTo([pos[0], pos[1], pos[2] + 3])
	avatar.addAction(walk_Forward)
Reply With Quote