LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: xxdaggerxx on June 20, 2006, 10:04:55

Title: coordinate problems
Post by: xxdaggerxx on June 20, 2006, 10:04:55
Hi guys, got a problem with the coordinates in a game im wrokin on.

The 0,0 coordinate is at the bottom left. I found this out using the mouse getX(),getY() (i returned the values on every frame).

Anyway i positioned my image on 0,0 but instead of appearing at the bottom left it appears at the top left.

Any clue why this might happen?

Thx guys
Title: coordinate problems
Post by: oNyx on June 20, 2006, 13:44:54
The mouse coord-system doesnt neccessarily need to be indentical with the opengl one.

Decide which one you would like to use eg top/left equals 0/0 and setup everything that way (setup ortho like that and calculate the mouse y value each time yourself).