Original Post
🔒 Locked
Mouse in DirectInput
Advertisement
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.
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
Chris
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement