From 1f4aa60399ee7b0f0d4cd8c78066c54c25cf2a15 Mon Sep 17 00:00:00 2001 From: talha Date: Fri, 25 Oct 2024 23:22:42 +0500 Subject: Setup a basic camera mover The camera now changes view after player moves beyond 80% of the screen up or right AND beyond 20% of the screen left or bottom. --- source/math.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/math.h') diff --git a/source/math.h b/source/math.h index 3ecf6fb..d682ae3 100755 --- a/source/math.h +++ b/source/math.h @@ -90,6 +90,10 @@ union Vec3 { r32 z; }; r32 data[3]; + + Vec2 v2() { + return Vec2{x, y}; + } }; typedef Vec3 RGB; -- cgit v1.2.3