View Single Post
Old 03-13-2008, 11:24 AM
farshizzo farshizzo is offline
WorldViz Team Member
Join Date: Mar 2003
Posts: 2,849
Add the cursor objects to the viz.ORTHO layer. Each window has its own viz.ORTHO layer, which is similar to viz.SCREEN, except that position values are in pixel units, instead of normalized units. Here is some sample code:
#Add a pointer to the screen
cursor = viz.add('arrow.tif')
size = cursor.getSize()
pointer1 = viz.addTexQuad(parent=viz.ORTHO,scene=window1,texture=cursor,scale=size)
pointer2 = viz.addTexQuad(parent=viz.ORTHO,scene=window2,texture=cursor,scale=size)
When updating the position of the pointers from the wiimote, just multiply the wiimote position by the (width,height) of the window.
Reply With Quote