![]() |
|
#1
|
|||
|
|||
You can set the position and size of the html form:
Code:
vizhtml.displayCode(html,pos=[0,0],size=[800,600]) Code:
import viz import vizmat import vizact viz.go() viz.add('dojo.osgb') quad = viz.addTexQuad(texture=viz.add('crosshair.png'),scale=[0.03,0.03,0]) quad.disable(viz.DEPTH_TEST) quad.drawOrder(10) quad.billboard() def updateCrosshair(): line = viz.MainWindow.screenToWorld(viz.mouse.getPosition()) worldPos = vizmat.MoveAlongVector(line.begin,line.dir,0.2) quad.setPosition(worldPos) vizact.onupdate(0,updateCrosshair) |
#2
|
|||
|
|||
Dear Jeff,
Thank you so much for your response. We have tested the provided code for the Oculus HMD. Thank you so much for your help, the html problem is solved; however, we still see two 'crosshair' images when We tested your provided code (adding the code below): import oculus hmd = oculus.Rift() viz.link(hmd.getSensor(), viz.MainView) The same issue was also displayed when we tested vizinfo. We did not have this issue with zSight. We are guessing that the problem may be because the images for left eye and right eye are mirrored positions and consequently the left and right images are required to be slightly different (for a stereoscopic view), but we are not sure. We appreciate your assistance again in this regard. Thank you in advance. |
#3
|
|||
|
|||
GUIs and texture quads need to be placed in world space in order to get fused correctly with the Oculus.
Try adjusting the value of the crosshair distance in the line below: Code:
worldPos = vizmat.MoveAlongVector(line.begin,line.dir,0.2) Code:
worldPos = vizmat.MoveAlongVector(line.begin,line.dir,0.5) |
![]() |
|
|