From d24e38698fef0ce0f49c1d890354ee73e08a149c Mon Sep 17 00:00:00 2001 From: Patrick Stephen Date: Sat, 21 May 2022 16:25:13 +0000 Subject: [PATCH] examples/top-down-shooter: fix set viewport logic --- examples/top-down-shooter/main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/top-down-shooter/main.go b/examples/top-down-shooter/main.go index 2f021cc2..17c0c915 100644 --- a/examples/top-down-shooter/main.go +++ b/examples/top-down-shooter/main.go @@ -91,9 +91,7 @@ func main() { ctx.Window.(*oak.Window).DoBetweenDraws(func() { char.ShiftDelta() oak.SetViewport( - screenCenter.Sub(intgeom.Point2{ - int(char.X()), int(char.Y()), - }), + intgeom.Point2{int(char.X()), int(char.Y())}.Sub(screenCenter), ) char.Delta = floatgeom.Point2{} })