View Single Post
Old 11-17-2003, 04:37 PM
farshizzo farshizzo is offline
WorldViz Team Member
Join Date: Mar 2003
Posts: 2,849
Hi Alex,

I believe I found the solution to your problem. You need to have the import viz and viz.go() statements at the very top of your script. You must always put these two lines before any other viz commands. There was a mistake in the previous versions that allowed you to bypass this, but it was corrected in 2.12

On a side note, I'm not sure if you are aware, but you can add layer objects to the screen by doing the following:
indicator = viz.endlayer(viz.SCREEN)
Then you can use screen coordinates to move the object. For instance if the mouse is at [0.2,0.3], then you would simply do:
and it would show up underneath the mouse pointer. I'm only saying this because I noticed that all the objects are always in front of the screen, and its usually easier to perform 2d calculations than 3d calculations. Hope this helps!
Reply With Quote