![]()  | 
	
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			Hello, 
		
		
		
		
		
		
		
		
	
	I want to draw a line with my mouse. So I made: Code: 
	def drawLine(): global tmpnumber while tmpnumber == 0: yield viztask.waitMouseDown(viz.MOUSEBUTTON_LEFT) tmpMousePOS = viz.screentoworld(viz.Mouse.getPosition()) tmpMousePOS.length = 0 pos = tmpMousePOS.end viz.startlayer(viz.LINES) viz.linewidth(10) viz.vertexcolor(viz.BLACK) viz.vertex(pos[0],pos[1],0) viz.vertex(pos[0],pos[1],0) line = viz.endlayer() VertexLink = viz.link(viz.Mouse,line.Vertex(1)) yield viztask.waitMouseUp(viz.MOUSEBUTTON_LEFT) VertexLink.remove() tmpnumber += 1 task = viztask.schedule( drawLine() ) Can somebody help me? I want to draw a line with my mouse. Not at the screen, but in the world. If I made this: Code: 
	def drawLine(): global tmpnumber while tmpnumber <= 1: yield viztask.waitMouseDown(viz.MOUSEBUTTON_LEFT) pos = viz.mouse.getPosition() viz.startlayer(viz.LINES) viz.linewidth(3) viz.vertexcolor(viz.BLACK) viz.vertex(pos[0],pos[1],0) viz.vertex(pos[0],pos[1],0) line = viz.endlayer(parent=viz.SCREEN) VertexLink = viz.link(viz.Mouse,line.Vertex(1)) yield viztask.waitMouseUp(viz.MOUSEBUTTON_LEFT) VertexLink.remove() tmpnumber += 1 And how can I create at the begin and end of the line an vertex point? Thanks an lot!!  | 
		
  | 
	
		
  | 
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| How to get the position of a vertex | Jerry | Vizard | 1 | 10-04-2006 12:28 PM | 
| get vertex with on the fly object | enkeli | Vizard | 9 | 05-25-2006 09:27 PM |