From 9d07c2760463062fa2afb52f533f8af4001c9576 Mon Sep 17 00:00:00 2001 From: Lubos Date: Sat, 30 Apr 2022 21:23:53 +0200 Subject: [PATCH] Hud model rendering fixed --- android/app/src/main/cpp/code/vr/vr_renderer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/cpp/code/vr/vr_renderer.c b/android/app/src/main/cpp/code/vr/vr_renderer.c index 35ceabb9..df4084e8 100644 --- a/android/app/src/main/cpp/code/vr/vr_renderer.c +++ b/android/app/src/main/cpp/code/vr/vr_renderer.c @@ -394,8 +394,9 @@ void VR_DrawFrame( engine_t* engine ) { vr.fov_y = (fabs(fov.angleUp) + fabs(fov.angleDown)) * 180.0f / M_PI; //Projection used for drawing HUD models etc + float hudScale = M_PI * 15.0f / 180.0f; const ovrMatrix4f monoVRMatrix = ovrMatrix4f_CreateProjectionFov( - 30.0f, 30.0f, 0.0f, 0.0f, 1.0f, 0.0f ); + -hudScale, hudScale, hudScale, -hudScale, 1.0f, 0.0f ); const ovrMatrix4f projectionMatrix = ovrMatrix4f_CreateProjectionFov( fov.angleLeft / vr.weapon_zoomLevel, fov.angleRight / vr.weapon_zoomLevel,