WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   Flashing Light Linked to Avatar (

Kyman2008 05-24-2013 06:58 AM

Flashing Light Linked to Avatar

I am developing a training module that I would like to have an avatars position tracked in. I have the avatar tracked now I would like to add a blinking or flashing light that is somehow attached to the avatar so that the avatar is more easily seen while being tracked. Is there anyway that I may do this? This is what I have tried so far....

avatar = viz.addAvatar('vcc_male.cfg', pos= viz.MainView.getPosition())

link= viz.MainView, avatar)

light5 = viz.addLight()

headbone = avatar.getbone('Bip01 Head')
link= headbone, light5)


Jeff 05-24-2013 11:24 AM

You could link an object to the avatar and change it's emissive property to simulate a blinking light:

import viz
import vizact
import vizshape

ball = vizshape.addSphere(radius=.03,pos=[0,1.8,4])
ToggleLight = vizact.sequence( [vizact.waittime(0.3), vizact.method.emissive(viz.YELLOW), vizact.waittime(0.3), vizact.method.emissive([0,0,0])], viz.FOREVER)

avatar = viz.addAvatar('vcc_male2.cfg',pos=[0,0,5],euler=[180,0,0])
headbone = avatar.getbone('Bip01 Head')
link= headbone, ball)


All times are GMT -7. The time now is 09:32 AM.

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