Jump to content
  • Advertisement
Sign in to follow this  

Forcing the mouse to follow one single line

This topic is 4824 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm rendering many lines (with GL_LINES of course) on the screen, and I can select any one of them (with glPickMatrix) and any vertex in the line. Is there any easy way to force the mouse (once a line and a vertex are selected and highlighted) to move along this line (to the next vertex)? My plan is this: compute the projected 2D position of the next vertex, then force the mouse to appear there with SetCursorPos. Any better idea? Is there an easier way to compute the projected 2D position of a vertex than multiplying it with all matrices? Thanks. [Edit:]compute the projected 2D position: gluProject :-)

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!