WorldViz User Forum

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

betancourtb82 02-10-2006 10:09 AM

Vizard Heads
 
I am trying to set up a scenario where an avatar appears and walks toward an individual. Once shot, the avatar should disappear. I modeled the code after the duck demo where you shoot the ducks with a ball. I'm also adding different faces to each avatar but the problem I'm having is that when the avatar body disappears, a "floating head" remains. Any suggestions? Here is the part of the code that controls these actions (the indentation don't show up but are correct on my code)

if object.isTarget and bullet.lastHit != object:
fade = vizact.fade(1,0,.5)
#Play the avatar hit animation
object.add(fade)
object.execute(7)
ResetAvatar(object)
#object.translate(avatarBeginPos)
#object.visible(viz.OFF)
#object.
#Play quack sound
viz.playsound('arrgh.wav')
# #Increment score
# IncrementScore()

hitObject = object

farshizzo 02-10-2006 10:42 AM

Hi,

You need to apply the fade action to the face also:
Code:

object.add(fade)
#If object is not an avatar with a face, then this will cause an error
object._face_.add(fade)



All times are GMT -7. The time now is 01:38 PM.

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