WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-03-2008, 09:22 AM
yyang yyang is offline
Member
 
Join Date: Aug 2008
Posts: 3
Smile How to make avatars to follow terrain while walking?

The terrain is not flat. It has small hills and some small items (such as boxes) on it. The terrain is imported from a 3DS file.

My question is how to make avatars walking on this terrain so that their feet are always on the ground or on the small objects on the ground when the avatars are walking. I know it must be related to collision and/or physics.

It would be great if you can post a small piece code here to show how to implement this.

Thanks.
Reply With Quote
  #2  
Old 08-04-2008, 03:54 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
When specifying the position to walk to, you can use a node as the Y value of the position. This will cause the walkTo action to set the height of the avatar to the height of the terrain. Here is an example:
Code:
import viz
viz.go()

#Add terrain model
terrain = viz.add('tut_ground.wrl',euler=(0,-10,0))

#Create walk action that follows terrain height
walkAction = vizact.walkTo([0,terrain,10])

#Add action to avatar
avatar = viz.add('vcc_female.cfg')
avatar.addAction(walkAction)
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
How to make avatar's eyes to blink when speaking michelcm3 Vizard 12 01-15-2008 09:48 AM
avatars dig Vizard 4 09-20-2007 04:29 PM
Avatars in an array and link/unlink betancourtb82 Vizard 7 09-05-2006 05:06 PM
Walking avatars --> collision detection? sjroorda Vizard 3 10-13-2005 05:47 AM


All times are GMT -7. The time now is 09:18 PM.


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