Fix small issue with death cam thumbstick movement

This commit is contained in:
Simon 2022-03-13 11:11:43 +00:00
parent 3fb6a4945a
commit b451a6f7d2
2 changed files with 4 additions and 3 deletions

View file

@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.drbeef.ioq3quest"
android:installLocation="preferExternal"
android:versionCode="33"
android:versionName="0.22.1">
android:versionCode="34"
android:versionName="0.23.0">
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />
<uses-feature android:glEsVersion="0x00030001" />
<!-- <uses-feature android:name="oculus.software.overlay_keyboard" android:required="false"/>-->

View file

@ -260,7 +260,8 @@ static void CG_OffsetVRThirdPersonView( void ) {
//Move camera if the user is pushing thumbstick
vec3_t angles, forward, right, up;
VectorCopy(vr->offhandangles, angles);
angles[YAW] += (vr->clientviewangles[YAW] - vr->hmdorientation[YAW]);
float deltaYaw = SHORT2ANGLE(cg.predictedPlayerState.delta_angles[YAW]);
angles[YAW] += deltaYaw + (vr->clientviewangles[YAW] - vr->hmdorientation[YAW]);
AngleVectors(angles, forward, right, up);
VectorMA(cg.vr_vieworigin, vr->thumbstick_location[THUMB_LEFT][1] * 5.0f, forward, cg.vr_vieworigin);
VectorMA(cg.vr_vieworigin, vr->thumbstick_location[THUMB_LEFT][0] * 5.0f, right, cg.vr_vieworigin);