View Single Post
  #2  
Old 10-17-2013, 03:19 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,466
You can set the position and size of the html form:
Code:
vizhtml.displayCode(html,pos=[0,0],size=[800,600])
Try placing the texture quad in world coordinates:
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)
Reply With Quote