WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-12-2013, 02:16 PM
Zhi Zhi is offline
Member
 
Join Date: Mar 2011
Posts: 49
How to simulate avatar walking along a slanted surface

Apparently, the vizact.walkTo() method only allows the avatar to walk along a horizontal surface. If I want to simulate avatar walking along a slanted surface (such as a hill), what shall I do. Moreover, if the ground surface is uneven (i.e. with different local height), how to keep the avatar always contacting the ground surface.

Please help me! Thanks!
Reply With Quote
  #2  
Old 11-15-2013, 03:48 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can pass the ground object as the height value:
Code:
import viz
import vizact
viz.go()

ground = viz.add('ground.osgb',euler=[0,20,0])
avatar = viz.addAvatar('vcc_male2.cfg')

walk = vizact.walkTo([0,ground,10])
avatar.runAction(walk)

viz.MainView.setPosition([10,0,5])
viz.MainView.setEuler([-90,0,0])
Reply With Quote
  #3  
Old 11-21-2013, 09:04 AM
Zhi Zhi is offline
Member
 
Join Date: Mar 2011
Posts: 49
Thank you Jeff. It works if the ground is an imported 3D model (i.e. a .osgb file). But if I create an object on the fly (for example, using the viz.addTexQuad() method), it seems your way does not work. Is it possible to let the avatar to follow the surface of an on-the-fly object?
Reply With Quote
  #4  
Old 11-21-2013, 04:27 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
It should still work if you add a quad. Try the following:
Code:
ground = viz.addTexQuad(scale=[50]*3,euler=[0,80,0])
Reply With Quote
Reply

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
walking of avatar via patriot Veronika Vizard 6 10-07-2011 12:33 AM
Avatar walking + camera free look kovitch Vizard 2 08-08-2011 07:57 AM
avatar walking over a sequence of points IGoudt Vizard 1 10-16-2009 11:22 AM
avatar automatically runs animation after fading into view v-clizzin Vizard 1 10-14-2009 05:01 PM
Looking through the eyes of an avatar Frank Verberne Vizard 2 04-01-2008 05:52 AM


All times are GMT -7. The time now is 08:25 PM.


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