PDA

View Full Version : About vizproximity


haohaoxuexi1
09-06-2016, 01:49 PM
When I add a sensor to a object, there will be a sensor like a frame outside the object.

Is there a method to get rid of the green frame like setting it to transparent or setting it only shows up when the mouse enter the sensor?

Thanks

Vaquero
09-06-2016, 03:29 PM
You can do something like:


manager.setDebug(viz.OFF)
debugEventHandle = vizact.onkeydown('1',manager.setDebug,viz.TOGGLE)


That way you can turn the debug shapes on/off with a key press, in this example '1'.

rajnishv
09-06-2016, 10:31 PM
Hi haohaoxuexi1
You can also use the Proximity Events when the target(MainView or Grabbber or any object) enters the proximity ,the Outer box Debug can be set to OFF and when the target leaves the proximity area the debug can bet set to ON.


def EnterProximity(e):
if e.sensor==sensor1:
manager.setDebug(viz.OFF)
if e.sensor==sensor2:
manager.setDebug(viz.OFF)
#and so on

def ExitProximity(e):
if e.sensor==sensor1:
manager.setDebug(viz.ON)
if e.sensor==sensor2:
manager.setDebug(viz.ON)

#-----Registering sensors for proximity enter and exit evenst--------#
manager.onEnter(None,EnterProximity)
manager.onExit(None,ExitProximity)


Thanx & reagrds
Mr.Rajnish Vishwakarma
Software Developer for Mobile,AR,VR

haohaoxuexi1
09-08-2016, 08:47 AM
You can do something like:


manager.setDebug(viz.OFF)
debugEventHandle = vizact.onkeydown('1',manager.setDebug,viz.TOGGLE)


That way you can turn the debug shapes on/off with a key press, in this example '1'.

thanks it works

haohaoxuexi1
09-08-2016, 08:48 AM
Hi haohaoxuexi1
You can also use the Proximity Events when the target(MainView or Grabbber or any object) enters the proximity ,the Outer box Debug can be set to OFF and when the target leaves the proximity area the debug can bet set to ON.


def EnterProximity(e):
if e.sensor==sensor1:
manager.setDebug(viz.OFF)
if e.sensor==sensor2:
manager.setDebug(viz.OFF)
#and so on

def ExitProximity(e):
if e.sensor==sensor1:
manager.setDebug(viz.ON)
if e.sensor==sensor2:
manager.setDebug(viz.ON)

#-----Registering sensors for proximity enter and exit evenst--------#
manager.onEnter(None,EnterProximity)
manager.onExit(None,ExitProximity)


Thanx & reagrds
Mr.Rajnish Vishwakarma
Software Developer for Mobile,AR,VR

thanks it works