View Single Post
  #3  
Old 12-18-2009, 11:10 AM
billjarrold billjarrold is offline
Member
 
Join Date: Jul 2009
Location: San Francisco Bay Area
Posts: 39
Thanks for the reply....right, so the question with a solution like the one you suggested is what to bind object to? I suppose I could map through every single object in the scene. But as I said in my original post, this seems inelegant (and not the kind of solution I remember thinking I glanced at several weeks/months ago).

Further, even if I do map through all objects and apply the fade to black action, then how do I make the rest of the world fade to black.

To make this concrete, see the code below which applies the solution you suggested. You'll see the dude fades to black but the world/room (aka "lab") does not. If someone can tell me how there's an easy way to make the rest of the word/room fade to black then perhaps I am done (I will next have to map through every object (node?) but I think I have some ideas on how to do that)..

Okay, here's the code.....

viz.go()

dude = viz.addAvatar('vcc_male.cfg')

lab = viz.add('lab.ive')

fadeAction = vizact.fadeTo(viz.BLACK,time=10)

dude.addAction(fadeAction)
lab.addAction(fadeAction)

....when you'll run it you'll see the dude fade to black but the room not.

(Tangential question: why does dude go from a state where's he's frozen in a kind of "scarecrow" posture to the "idle" posture (i.e. where he's standing relatively still but like a normal person, shifting he weight a little, looking around etc...state = 1 or somesuch??)...I never told vizard to make him change his state. Why does it do this?)
Reply With Quote