Mouse.getY() Value

Started by numberR, December 19, 2006, 05:36:54

Previous topic - Next topic

numberR

Hello guys,

I just noticed that a value returned by Mouse.getY() decrease (goes toward 0) as I move the mouse down, and it increases as I move the mouse up. Is this expected behavior?

If so, and if I want to get Y value to increase when I move the mouse down, do I need to keep track of DX?

Thanks.

the2bears

Quote from: numberR on December 19, 2006, 05:36:54
Hello guys,

I just noticed that a value returned by Mouse.getY() decrease (goes toward 0) as I move the mouse down, and it increases as I move the mouse up. Is this expected behavior?

If so, and if I want to get Y value to increase when I move the mouse down, do I need to keep track of DX?

Thanks.


This is expected behaviour, as it maps to OpenGL's coordinate system... 0,0 is the bottom left of the screen, with positive y being up.

edit: how about y = screenHeight - y ?

Bill
the2bears - the indie shmup blog

numberR

ahh, thanks!
i have a method to convert one coordinate system to OpenGL one, and was calling it twice for the cursor...