It sounds like you maybe looking for the yaw component of the euler angle. The following example shows the yaw, pitch, and roll values every frame:
Code:
import viz
import vizact
import vizinfo
viz.go()
info = vizinfo.InfoPanel('Head Ori Data')
yaw = info.addLabelItem('yaw',viz.addText(''))
pitch = info.addLabelItem('pitch',viz.addText(''))
roll = info.addLabelItem('roll',viz.addText(''))
viz.add('dojo.osgb')
def updateInfo():
ori = viz.MainView.getEuler()
yaw.message('{:.2f}'.format(ori[0]))
pitch.message('{:.2f}'.format(ori[1]))
roll.message('{:.2f}'.format(ori[2]))
vizact.onupdate(0,updateInfo)