WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-10-2006, 10:09 AM
betancourtb82 betancourtb82 is offline
Member
 
Join Date: Jan 2006
Posts: 103
Question 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
Reply With Quote
  #2  
Old 02-10-2006, 10:42 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:02 AM.


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