WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-12-2005, 10:16 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

There is no built-in way to prevent avatars colliding with each other or having them collide with the viewpoint. You will have to perform this collision check manually. You could create a timer that checks if two avatars are a certain distance from each other and stop them if they are. You could do the same with the viewpoint too.

Here is some code to use arrays to create your avatars:
Code:
#Create the avatars
avatars = []
for x in range(9):
    a = viz.add('female.cfg')
    a.translate(1,0,1)
    avatars.append(a)

#Have all the avatars walk
for a in avatars:
    a.act(a.walkto(view_pos[0] + whrandom.randint(-2, 3), 0, view_pos[2] + whrandom.randint(-2, 3)))
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


All times are GMT -7. The time now is 12:57 AM.


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