Fixed screen distance setting

This commit is contained in:
Simon 2022-12-18 11:43:49 +00:00
parent 14fe1a87d4
commit 2edc332201

View file

@ -2466,9 +2466,9 @@ void JKVR_submitFrame()
quad_layer.subImage.imageArrayIndex = 0; quad_layer.subImage.imageArrayIndex = 0;
const XrVector3f axis = {0.0f, 1.0f, 0.0f}; const XrVector3f axis = {0.0f, 1.0f, 0.0f};
XrVector3f pos = { 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, 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.orientation = XrQuaternionf_CreateFromVectorAngle(axis, radians(vr.hmdorientation_snap[YAW]));
quad_layer.pose.position = pos; quad_layer.pose.position = pos;