From 2edc3322019da7feee796c616383e7ccbf1539e5 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 18 Dec 2022 11:43:49 +0000 Subject: [PATCH] Fixed screen distance setting --- Projects/Android/jni/JKVR/JKVR_SurfaceView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projects/Android/jni/JKVR/JKVR_SurfaceView.cpp b/Projects/Android/jni/JKVR/JKVR_SurfaceView.cpp index 9a6c6b5..a6bf94e 100644 --- a/Projects/Android/jni/JKVR/JKVR_SurfaceView.cpp +++ b/Projects/Android/jni/JKVR/JKVR_SurfaceView.cpp @@ -2466,9 +2466,9 @@ void JKVR_submitFrame() quad_layer.subImage.imageArrayIndex = 0; const XrVector3f axis = {0.0f, 1.0f, 0.0f}; XrVector3f pos = { - gAppState.xfStageFromHead.position.x - sin(radians(vr.hmdorientation_snap[YAW])) * 4.0f, + gAppState.xfStageFromHead.position.x - sin(radians(vr.hmdorientation_snap[YAW])) * (2.0f + vr_screen_dist->value), 1.0f, - gAppState.xfStageFromHead.position.z - cos(radians(vr.hmdorientation_snap[YAW])) * 4.0f + gAppState.xfStageFromHead.position.z - cos(radians(vr.hmdorientation_snap[YAW])) * (2.0f + vr_screen_dist->value) }; quad_layer.pose.orientation = XrQuaternionf_CreateFromVectorAngle(axis, radians(vr.hmdorientation_snap[YAW])); quad_layer.pose.position = pos;