nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gamnit: fix Y axis un `screen_to_ui`
[nit.git]
/
lib
/
gamnit
/
cameras.nit
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
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
end
# Center of the screen, from the point of view of the camera, at z = 0