Hello,
I want to create a vertex at the mouseclick position, but I don't know how to do it.
If I create two vertex points:
Code:
viz.startlayer(viz.POINTS)
viz.pointsize(10)
viz.vertexcolor(viz.RED)
viz.vertex(0,0,10)
viz.vertex(1,1,10)
line = viz.endlayer()
And afterthat I click with my mouse at these points and look at my output window:
Code:
print viz.mouse.getPosition()
Then I had to recognize, that there are absolutly different values.
The vertex are at [0,0,10] and [1,1,10] and my mouseposition shows [0.6,0.3] and [0.5,0.2]!
Are the vertex coordinates world coordinates? Or what means 0,0,10? And what are the mouseposition coordinates?
What's the reason for this difference. I want to create vertex at the mouseclick position.
Can anybody help me - please.