runs in VR
[vrtris] / src / game.c
index f2d888a..05bdc95 100644 (file)
@@ -34,6 +34,7 @@ int game_init(int argc, char **argv)
                        return -1;
                }
                goatvr_set_origin_mode(GOATVR_HEAD);
+               goatvr_set_units_scale(10.0f);
 
                goatvr_startvr();
                should_swap = goatvr_should_swap();
@@ -108,7 +109,7 @@ void game_display(void)
                /* non-VR mode */
                glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
-               cgm_mperspective(proj_matrix, cgm_deg_to_rad(50.0), win_aspect, 0.5, 500.0);
+               cgm_mperspective(proj_matrix, cgm_deg_to_rad(40.0), win_aspect, 0.5, 500.0);
                glMatrixMode(GL_PROJECTION);
                glLoadMatrixf(proj_matrix);
 
@@ -154,6 +155,12 @@ void game_keyboard(int key, int pressed)
                        }
                        break;
 
+               case KEY_HOME:
+                       if(opt.flags & OPT_VR) {
+                               goatvr_recenter();
+                       }
+                       break;
+
                default:
                        break;
                }