Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

overlord

mouse with direct3d

This topic is 6506 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

im doing a game menu, and i wanna give the user the choice to select an item of the menu clicking over the item, but how can i get the position of the cursor? im using DirectInput, so i get the coords of the cursor, but what should i do to convert them to 3d coords? sorry if my question is a little confuse

Share this post


Link to post
Share on other sites
Advertisement
Your questions makes perfectly good sense.

I am, however, going to give you a vague answer, cause I don''t know the answer for sure.

Look at pick.cpp. Its a sample that came with DirectX 8. It grabs the mouse coordinates as 2d, then applies them to a 3d environment using the camera and view fustrum information.

I don''t know how it does it, but take a look at it. . .

Hope that helps.

DmGoober

Share this post


Link to post
Share on other sites

  • 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!