Mouse motion

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
shaim
Posts: 26
Joined: Sun Dec 14, 2008 10:55 am

Mouse motion

Post by shaim »

Hi

How can i capture the mouse motion to know fast/slow mouse drag

Thanks.
Seven
Posts: 1034
Joined: Mon Nov 14, 2005 2:03 pm

Post by Seven »

use multiple variables.....

each time mouse_move is detected do something like this

{
current_mouse_pos = getCursorPos();
delta = current_mouse_pos - old_mouse_pos;
if (delta.X < 5) then mouse moved slowly
else if (delta.X < 10) then mouse moved medium
else mouse moved fast

old_mouse_pos = current_mouse_pos;
}
Post Reply