Browse Source

Lesson 18.4

Godzil 3 years ago
parent
commit
819baa505b
1 changed files with 3 additions and 0 deletions
  1. 3 0
      source/main.c

+ 3 - 0
source/main.c

@@ -207,6 +207,9 @@ void update()
             projected.x *= windowWidth / 2.;
             projected.y *= windowHeight / 2.;
 
+            /* Screen Y axis increase down, 3D world Y grows up, so we need to invert. */
+            projected.y *= -1.0;
+
             projected.x += (windowWidth / 2.);
             projected.y += (windowHeight / 2.);