Skip to content
Snippets Groups Projects
Commit 966bce8c authored by faiface's avatar faiface
Browse files

fix Camera

parent ea63453f
No related branches found
No related tags found
No related merge requests found
......@@ -94,6 +94,5 @@ func (t Transform) Mat3() mgl32.Mat3 {
//
// It is possible to apply additional rotations, scales and moves to the returned transform.
func Camera(center, zoom, screenSize Vec) Transform {
scale := screenSize * zoom / 2
return Position(0).Anchor(center).ScaleXY(scale)
return Position(0).Anchor(center).ScaleXY(2 * zoom).ScaleXY(V(1/screenSize.X(), 1/screenSize.Y()))
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment