mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-21 19:51:33 +00:00
Fixed screen distance setting
This commit is contained in:
parent
14fe1a87d4
commit
2edc332201
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue