View Single Post
  #1  
Old 11-08-2014, 07:40 AM
aaaa aaaa is offline
Member
 
Join Date: Nov 2014
Posts: 9
how to draw a line on the 2D screen with mouse

in the 2D screen, I want to draw a line. One point of the line is given, for example (400,500,0), the other point of the line is where the click of the mouse.

since the coordinate range of the mouse is [0,1], while the coordinate range of the point of the line is determinated by the resolution of the screen. How to make sure the other end of the line is the point where the mouse clicks?
Reply With Quote