gamnit: fix Y axis un `screen_to_ui`
authorAlexis Laferrière <alexis.laf@xymus.net>
Sun, 2 Apr 2017 04:07:12 +0000 (00:07 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Tue, 4 Apr 2017 16:31:49 +0000 (12:31 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/gamnit/cameras.nit

index be7edcf..0756a38 100644 (file)
@@ -234,7 +234,7 @@ class UICamera
 
                var wx = x.to_f * width / display.width.to_f - position.x
                var wy = y.to_f * height / display.height.to_f - position.y
-               return new Point[Float](wx, wy)
+               return new Point[Float](wx, -wy)
        end
 
        # Center of the screen, from the point of view of the camera, at z = 0