#1
|
|||
|
|||
Add a red flash when tracker moves off of a path
We have people walk on a balance beam with an Optotrak rigid body which tracks their movement. We want the display to flash red whenever they step off to the side a certain amount (x-direction). The flash would look like what is available in The Pit script. How can I add this effect for when people step to the side and the rigid body deviates off the path?
I'd also like to be able to toggle this function off and on as the script is running to remove any potential for flashes when need be. Thanks! |
#2
|
|||
|
|||
You could have a proximity sensor around the beam so that when the user moves out of the sensor area the flash is activated.
|
#3
|
|||
|
|||
To toggle the flash effect add a boolean variable that can be toggled (e.g with keypress). Then only run the flash effect code if the boolean value is true.
|
#4
|
|||
|
|||
I defined my event as ToggleRed and got it to work with the proximity sensor.
I added this toggle keypress: vizact.onkeydown('m',ToggleRed) However, I'm unable to toggle it off after toggling it on (i.e. it starts off as off, I press 'm' to toggle it on, but then pressing 'm' again doesn't toggle it off). What am I missing to be able to toggle it both on and off? Thanks! |
#5
|
|||
|
|||
If this has not been resolved please post example code that shows the issue.
|
Tags |
animation, optotrak, pit, vizact |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Road Animation Path | vserchi | Vizard | 4 | 11-12-2015 10:29 AM |
Unusual tracker sensor setup with Vizard | Zhi | Vizard | 2 | 06-12-2012 10:52 AM |
Integrated orientation tracker in zSight HMD | Zhi | Vizard | 2 | 06-06-2012 09:29 AM |
The problem of tracker using via VRPN | _kj_ | Vizard | 2 | 08-13-2009 01:03 AM |
Problems with interaction of vizact.turn and animation path | Enlil | Vizard | 3 | 11-24-2008 05:23 PM |