Jump to content
  • Advertisement
Sign in to follow this  
neodasan

how can I measure mouse movement distance?

This topic is 3073 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 am trying to measure how many miles users's mouse cursor travel. is there any good way to do that? I was trying to use RAWINPUT, but its x and y values doesn't make sense to me. Thank you.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
I am trying to measure how many miles users's mouse cursor travel. is there any good way to do that? I was trying to use RAWINPUT, but its x and y values doesn't make sense to me.
What do you mean by 'miles'? Are you trying to measure the accumulated 'real' distance that the cursor travels onscreen, or something of that sort?

Share this post


Link to post
Share on other sites
Quote:
Original post by jyk
What do you mean by 'miles'? Are you trying to measure the accumulated 'real' distance that the cursor travels onscreen, or something of that sort?




Oops sorry. I meant that Distance is equal to the number of pixels. We don't need to convert pixels to real length.

How can I measure the number of pixels if i have some absolute values?

Share this post


Link to post
Share on other sites
Easy enough, use 2 variables to hold the current mouse position, on the next mouse move message, substrack those value with the new one, replace the variables value with the new one.

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!