WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-06-2009, 04:23 AM
Moh200jo Moh200jo is offline
Member
 
Join Date: Feb 2009
Posts: 99
Walking to many directions.

Hi every one, my avatar will walk to unknown distances and directions. I tried to rotate her while she is walking but the code does not response. I am still plying with the following code.
HTML Code:
import viz
viz.go()
avatar = viz.add('vcc_female.cfg')
avatar.setPosition(0,0,5)
pos = avatar.getPosition()
ss=1
def myKeyboard(key):
	ss=1
	gg=5
	pos = avatar.getPosition()
	if key == viz.KEY_UP:
		ss=ss+5
		walk_Forward = vizact.walkTo([pos[0], pos[1],pos[2]+ss])
		avatar.addAction(walk_Forward)
	if key==viz.KEY_LEFT:
		gg=gg + 10
		rotate=vizact.spin(0,1,0,gg,1)
		avatar.addAction(rotate)
		
	if key == viz.KEY_DOWN:
		ss=ss+5
		walk_Forward = vizact.walkTo([pos[0], pos[1], pos[2] - ss])
		avatar.addAction(walk_Forward)
	
viz.callback(viz.KEYBOARD_EVENT,myKeyboard)


Any help would be appreciated.
Thanks,
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Walking viewpoints TrashcanPatrol Vizard 5 05-02-2013 09:14 AM
Walking Function Moh200jo Vizard 2 02-24-2009 10:07 AM
How to make avatars to follow terrain while walking? yyang Vizard 1 08-04-2008 02:54 PM
Walking avatars --> collision detection? sjroorda Vizard 3 10-13-2005 04:47 AM


All times are GMT -7. The time now is 06:07 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC