Jump to content
  • Advertisement
Sign in to follow this  
nixon

Mouse Coordinates

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

Hi, Im using Managed DirectX and the SDK Sampleframework. In the sampleframework, I can only capture the MouseX and MouseY as an integer (in the dxmutgui.cs). Is there any way of getting the mouse coordinates as a float? Im moving some graphics around with the mouse and it looks a little jaggy and not as smooth as I hoped for. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
I'd be very supprised if the mouse actually treated coordinates in decimal...

However, you could write a bit of code that uses acceleration, and so makes small movements of the mouse (for example, maybe just a few pixels in a second) only move a tiny (1 - 2 pixels?) amount, and larger movements much quicker. It's more detailed than that - but it's what your mouse, in Windows at least, already does. This won't affect your program, though, which probably doesn't use the same acceleration.

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!