![]() |
|
|
|
#1
|
|||
|
|||
|
Hi,
you don't need sensors to do that. I would rather use a timer to call a function every frame that constantly checks the view direction and sends a signal when a certain value is reached, e.g.: Code:
import viz
import viztask
arena = viz.addChild('pit.osgb')
angleSignal = viztask.Signal()
checkedAngle = 90 # at which view angle should the sensor be activated?
def checkViewAngle():
[yaw,picht,roll] = viz.MainView.getEuler()
if int(yaw) == checkedAngle:
angleSignal.send()
print('Angle detected!')
orientationSensor = vizact.ontimer(0,checkViewAngle) # start the function
viz.go()
|
|
#2
|
|||
|
|||
|
hi,
thanks, exactly what i needed! |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unusual tracker sensor setup with Vizard | Zhi | Vizard | 2 | 06-12-2012 10:52 AM |
| sensor or not sensor? | nige777 | Vizard | 0 | 03-29-2011 05:03 AM |
| problem in setting the orientation of bones | bharatbhushan | Vizard | 0 | 06-30-2009 05:30 AM |
| wiimote and sensor bar | masaki | Vizard | 1 | 03-06-2008 04:07 PM |
| Multiple Copies of same sensor plugin | RedSpikeyThing | Plug-in development | 2 | 02-12-2008 03:10 PM |