WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Avatar Attributes (https://forum.worldviz.com/showthread.php?t=557)

betancourtb82 04-17-2006 11:13 AM

Avatar Attributes
 
I'm trying to create an array of avatars, each with a different set of attributes (body, face, name, etc.). I'm thinking of developing a class that has these "attributes" as shown below:
Code:

class Person(object):
        self.name = name
        self.enemy = enemy
        viz.add(body)
        viz.add(face)

Using these attributes, I'm thinking of putting each "person" into an array, based on their name. Can I have some pointers on how to do this. I'm kind of stuck.

farshizzo 04-17-2006 01:23 PM

Hi,

Take a look at the following thread. It describes how to creat your own class that inherits from an avatar:

http://www.worldviz.com/forum/showthread.php?t=241

Also, if you want to access avatars by name then you should create a dictionary instead of a list. Here is an example:
Code:

name_dict = {}
name_dict['Bob'] = viz.add('male.cfg')
name_dict['Jane'] = viz.add('female.cfg')

name_dict['Jane'].translate(0,0,3)



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

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