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()