Archived

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

Arcibald Wearlot

DirectInput (mouse): relative vs absolute

Recommended Posts

my first 3d engine is growing ^^ and since it is able to display my own format models and lots of other stuff, i started coding the input engine here''s my problem: when i create the mouse device im not sure if it would be better to create it in relative or absolute mode for now i used relative mode so its easy to move the camera with the mouse (and with the speed of the mouse) but im in trouble when i need to know the cursor position.. what you think is the best way? use relative mode and then use some win functions / your functions to handle cursor pos, or use absoulte mode and then calculate the relative movement of the mouse? i just want to know what you would use, since i have to choose one of these 2 ways and i don''t know wich one would be the best tnx in advance

Share this post


Link to post
Share on other sites
hi Arcibald,

you'll likely be drawing your own cursor within your game so the problem you forsee is a red herring. use relative mode for your camera movement and when you are ready to draw your cursor pick an arbitrary absolute position and track it from there.

if you havent considered drawing your own cursor please rethink that decision instead, as you'll eventually want complete control over your cursor and its appearance, as well as implementing mouse-over events from scratch.

Best of Luck

Dredd

[edited by - Dreddnafious Maelstrom on October 23, 2003 6:52:21 PM]

Share this post


Link to post
Share on other sites