View Single Post
Old 09-12-2005, 09:16 AM
farshizzo farshizzo is offline
WorldViz Team Member
Join Date: Mar 2003
Posts: 2,849

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:
#Create the avatars
avatars = []
for x in range(9):
    a = viz.add('female.cfg')

#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