WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 12-22-2014, 01:46 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Yes, you can give a model name as the Y position of the walkTo command. The walkTo will adjust the height of the avatar to match the height of the model:

Code:
import viz
import vizact
import vizmat

viz.setMultiSample(4)
viz.fov(60)
viz.go()

viz.clearcolor(viz.SLATE)
viz.addChild('ground.osgb')
viz.move([0,0,-2])

quad = viz.addTexQuad(pos=[0,0,4.5],euler=[0,65,0],scale=[2,10,1],color=viz.RED)
quad2 = viz.addTexQuad(pos=[0,0,13.50],euler=[180,65,0],scale=[2,10,1],color=viz.RED)

avatar = viz.addAvatar('vcc_male2.cfg')
avatar.disable(viz.INTERSECTION)
avatar.state(2)

walk1 = vizact.walkTo([0,0,4.5],walkSpeed=2)
walk2 = vizact.walkTo([0,quad,9],walkSpeed=2)
walk3 = vizact.walkTo([0,quad2,13.55],walkSpeed=2)

walk = vizact.sequence([walk1,walk2,walk3])
avatar.runAction(walk)
	
view = viz.addView()
view.setPosition([-20,5,9])
view.setEuler([90,15,0])
window = viz.addWindow(view=view)
window.setSize([.4,.4])
window.setPosition([0,1])
Reply With Quote
 

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
problem with avatar climp a ramp befl0 Vizard 14 07-30-2014 02:28 PM
.osg biped avatar problem alvinadi Vizard 3 12-20-2011 10:29 AM
Avatar speaking problem Uttama_vizard Vizard 4 03-23-2009 11:29 AM
Problem with letting an avatar face towards another avatar ghazanfar Vizard 2 03-21-2007 02:30 AM
making a talking and imitating avatar marc van gaal Vizard 9 10-20-2006 04:28 AM


All times are GMT -7. The time now is 01:34 PM.


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