WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-12-2005, 09: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
 


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 01:56 PM.


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