mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-10 06:42:17 +00:00
Fixed screen distance setting
This commit is contained in:
parent
5acd17a9df
commit
3d6af564c8
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