nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03d3d8e
)
gamnit: fix Y axis un `screen_to_ui`
author
Alexis Laferrière
<alexis.laf@xymus.net>
Sun, 2 Apr 2017 04:07:12 +0000
(
00:07
-0400)
committer
Alexis 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
patch
|
blob
|
history
diff --git
a/lib/gamnit/cameras.nit
b/lib/gamnit/cameras.nit
index
be7edcf
..
0756a38
100644
(file)
--- a/
lib/gamnit/cameras.nit
+++ b/
lib/gamnit/cameras.nit
@@
-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