View Full Version : Avatar
Moh200jo
03-23-2009, 01:29 AM
My application requires the avatar to walk for unknown distance and direction; mouse or keyboard should control the direction. How vizard do that?
Any suggestion would be really appreciated.
Thanks,
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
pos = avatar.getPosition()
if key == viz.KEY_UP:
walk_Forward = vizact.walkTo([pos[0], pos[1], pos[2] + 3])
avatar.addAction(walk_Forward)
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.