Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: Mouse position change  (Read 422 times)

x3r0123

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 5
    • View Profile
Mouse position change
« on: June 26, 2011, 11:00:24 AM »

Hello again,

I did a search but it seems that this topic hasn't been explained in great details and I apologize if it has already.
Basically when mouseMoved function kicks in, there is a change of how many units the mouse has moved.
Now if I try to debug the mouse state, there are a bunch of X/Y/Z.abs and .rel values. I know Z signifies the scroll, X should be horizontal and Y for vertical movements.
I don't exactly understand what the abs and rel mean. Also, an example would greatly help.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Re: Mouse position change
« Reply #1 on: June 27, 2011, 09:32:00 PM »

Abs is the current cumulative value of the axis (ie the current value of x/y and z). Relative is the change since the last capture call (+/- value of axis). Every call to capture clears the last relative value, whereas the abs[solute] value is a running total that goes up/down based on the last relative changes.
Logged

x3r0123

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 5
    • View Profile
Re: Mouse position change
« Reply #2 on: June 28, 2011, 05:50:25 PM »

awesome, thanks for the info
Logged