Skip to content

Commit

Permalink
HOPEFULLY fixed checkpoint camera tomfoolery
Browse files Browse the repository at this point in the history
  • Loading branch information
whateverusername0 committed Apr 19, 2023
1 parent 834c414 commit bb3f361
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
using HarmonyLib;
using System;
using UnityEngine;

namespace Plugin.VRTRAKILL.VRPlayer.VRCamera.Patches
{
[HarmonyPatch(typeof(NewMovement))] internal class FixCameraOnRespawn
{
[HarmonyPrefix] [HarmonyPatch(nameof(NewMovement.Respawn))] static void SetPlayerRotation(NewMovement __instance)
{
// HOW :(
CameraConverter.Container.transform.localPosition = Vector3.zero;
CameraConverter.Container.transform.localRotation = Vars.MainCamera.transform.rotation;

__instance.transform.localRotation = CameraConverter.Container.transform.localRotation;
}
}
}

0 comments on commit bb3f361

Please sign in to comment.