WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   how to make the viz.connect avater invisible? (https://forum.worldviz.com/showthread.php?t=5865)

shashkes 10-10-2016 05:17 AM

how to make the viz.connect avater invisible?
 
Hi, for an experiment I'm running I want the avatar that is created using viz.connect and optotrak sensors and representing the subjects movements to become invisible for some of the trials and visible again for others.
I don't want to remove the avatar because I still want to register the location of the sensors I just want the avatar not to appear on the screen so on some trials the subject gets visual feedback of their movements while on others not.
what is the best way to do that?
Thanks!

Jeff 10-10-2016 05:33 AM

Use the vizconnect avatar's setVisible method. It can be set to viz.ON, viz.OFF, or viz.TOGGLE:

Code:

avatar = vizconnect.getAvatar('male_2')
avatar.setVisible(viz.OFF)


shashkes 10-10-2016 08:04 AM

That didn't work for me. I had to use the getNode3d(), which turned out to be viz.VizAvatar(13). so this worked:

subjectavatar = vizconnect.getAvatar()
print str(subjectavatar.getNode3d())

viz.VizAvatar(13).visible(viz.OFF)

shashkes 10-10-2016 08:07 AM

oh, I realized if I use male not male_2 avatar so your solution also works if I remove the 2thanks
avatar = vizconnect.getAvatar('male')
avatar.setVisible(viz.OFF)


All times are GMT -7. The time now is 12:59 AM.

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