Jump to content
  • Advertisement


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


mouse with direct3d

This topic is 6592 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
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.


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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!