This commit is contained in:
Josh Deprez 2021-08-10 16:53:51 +10:00
parent 9592cfc794
commit 1ff2aa1fcf

View file

@ -22,7 +22,7 @@ type Camera struct {
} }
func (c *Camera) Draw(screen *ebiten.Image, geom ebiten.GeoM) { func (c *Camera) Draw(screen *ebiten.Image, geom ebiten.GeoM) {
// move the c.Centre to the origin // move c.Centre to the origin
geom.Translate(-float64(c.Centre.X), -float64(c.Centre.Y)) geom.Translate(-float64(c.Centre.X), -float64(c.Centre.Y))
// zoom and rotate // zoom and rotate
geom.Scale(c.Zoom, c.Zoom) geom.Scale(c.Zoom, c.Zoom)