Sign in to follow this  
initial_y

Mouse in DirectInput

Recommended Posts

initial_y    123
How to deduce how far the mouse has actual rolled so that I can determine the cursor's movement. I don't find the unit length of movement of the axis. The unit is "1", but how far "1" is ?

Share this post


Link to post
Share on other sites
Archi    124
Quote:
Original post by initial_y
How to deduce how far the mouse has actual rolled so that I can determine the cursor's movement. I don't find the unit length of movement of the axis. The unit is "1", but how far "1" is ?


As I can understand, you need "granularity". AFAIR by default granularity is 1, that means 1 pixel. As you cannot set granularity for x/y axis, you should use sensivity multipliers.

Share this post


Link to post
Share on other sites
Supernat02    604
What kind of application are you wanting to use DirectInput for. It's good for some things, not so good for others. For instance, when wanting to know exactly where the mouse cursor is on the screen, it's highly recommended to use Windows Messages, specifically WM_MOUSEMOVE. Similarly, if you wanted to capture text input on the keyboard, you would again use Windows Messages instead of DirectInput. DI may not be what you need for this application. Even Microsoft states this under the DI section in the SDK. Does this answer the question or is there a particular need you have for using DI? i.e. If you are using the mouse to control a spaceship's forward direction (changing the camera Look-At position), DI is best. In that case though, units are relative to how fast you want the spaceship to turn, so you can define a constant to modulate the mouse movement.

Chris

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this