View Single Post
  #2  
Old 01-03-2017, 11:22 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,453
You can get a handle to the event and then enable, disable, or toggle its state:

Code:
enterEvent = manager.onEnter(sensor, EnterProximity)
exitEvent = manager.onExit(sensor, ExitProximity)

vizact.onkeydown('1',enterEvent.setEnabled,viz.TOGGLE)
vizact.onkeydown('2',exitEvent.setEnabled,viz.TOGGLE)
Reply With Quote