![]() |
#5
|
|||
|
|||
As Jeff pointed out, the message receiver needs to do different things depending on the message type.
For flexibility, try adding a 'messageType' variable to all your <mailbox>.send() calls. That way you can check the 'messageType' in your 'onNetwork' function then access the variables you know come with specific message types. Code:
CREATE_PERSON_NETWORK_EVENT = 1 UPDATE_PERSON_NETWORK_EVENT = 2 def personJoined(): mailbox.send(messageType=CREATE_PERSON_NETWORK_EVENT, avatarFileName='blabla.cfg') def sendPersonData(person): mailbox.send(messageType=UPDATE_PERSON_NETWORK_EVENT, euler=... def onNetwork(e): if e.messageType == CREATE_PERSON_NETWORK_EVENT: viz.add(e.avatarFileName) .... elif e.messageType == UPDATE_PERSON_NETWORK_EVENT: otherPerson.setEuler(e.euler) Jeff or Farshizo can you post that *sweet* viznet demo with the boxes and springs?
__________________
Paul Elliott WorldViz LLC |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problems with getting head bone rotation right | Enlil | Vizard | 2 | 02-13-2009 10:24 AM |
Awkward neck/shoulder connection when adding custom head to vcc model. | vEsotu | Vizard | 5 | 10-09-2008 05:07 PM |
problems adding a custom morph head to a custom body | Greenwu | Vizard | 1 | 07-27-2006 10:32 AM |
avatar head texture issues | rconrey | Vizard | 3 | 11-17-2004 04:05 PM |
How to simply texture an avatar's head with a jpeg graphic? | vr_boyko | Vizard | 3 | 10-26-2004 10:44 AM |