You want the position/pitch/roll of the box based on the viewpoint and the yaw of the box based on the sensor, correct?
If that's the case you could manually update the box orientation every frame in a function registered with vizact.onupdate:
Code:
import viz
import vizact
viz.go()
box = viz.add('box.wrl', pos=[0,0,0])
plan = viz.add('tut_ground.wrl')
mySensor = viz.add( 'testtrack_all.dls' )
link = viz.link(viz.MainView, box, mask=viz.LINK_POS)
link.postTrans([0,0,6])
def updateOri():
yaw = mySensor.getEuler()[0]
pitch = viz.MainView.getEuler()[1]
roll = viz.MainView.getEuler()[2]
box.setEuler([yaw,pitch,roll])
vizact.onupdate(0,updateOri)