WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Swapping VZF heads on the same avatar (https://forum.worldviz.com/showthread.php?t=230)

vr_boyko 10-20-2004 10:51 AM

Swapping VZF heads on the same avatar
 
Hi there,

I was wondering -- how do you "swap" one .vzf head with another on the same avatar?

For example, I have this neutral.vzf head for an avatar, and if I want his face to change to be happy.vzf -- how do I do so without having the head just superimpose itself onto the old neutral.vzf head?

(I defined a function in my class like this:

def face(self, facename):
self.head = viz.add(facename)
self.agent.face(self.head)
)

farshizzo 10-20-2004 11:10 AM

Hi,

Have you tried adding the happy head as a morph target of the neutral head? That would probably be the best way. Either way, to swap heads simply make the old head invisible and set the new head as the face:
Code:

neutral = viz.add('neutral.vzf')
happy = viz.add('happy.vzf')

avatar.face(neutral)

#Swap faces
neutral.visible(0)
avatar.face(happy)



All times are GMT -7. The time now is 02:35 PM.

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